svn commit: r315102 - head/usr.sbin/bsnmpd/modules/snmp_hostres

Marcelo Araujo araujo at FreeBSD.org
Sun Mar 12 03:43:30 UTC 2017


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).


More information about the svn-src-head mailing list