Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Mar 2017 03:43:29 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315102 - head/usr.sbin/bsnmpd/modules/snmp_hostres
Message-ID:  <201703120343.v2C3hTIL024837@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: araujo
Date: Sun Mar 12 03:43:28 2017
New Revision: 315102
URL: https://svnweb.freebsd.org/changeset/base/315102

Log:
  Use nitems() from sys/param.h.
  
  Reviewed by:	ngie
  Differential Revision:	https://reviews.freebsd.org/D9943

Modified:
  head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c

Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c
==============================================================================
--- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c	Sun Mar 12 03:36:33 2017	(r315101)
+++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c	Sun Mar 12 03:43:28 2017	(r315102)
@@ -143,7 +143,7 @@ static const struct {
 	{ "hpfs",	&OIDX_hrFSHPFS_c },
 	{ "smbfs",	&OIDX_hrFSOther_c },
 };
-#define	N_FS_TYPE_MAP	(sizeof(fs_type_map) / sizeof(fs_type_map[0]))
+#define	N_FS_TYPE_MAP	nitems(fs_type_map)
 
 /**
  * Create an entry into the FS table and an entry in the map (if needed).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703120343.v2C3hTIL024837>