From 21a973f499d4069e8427bc18999d9fefb9ad777d Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Sun, 12 Mar 2017 03:43:28 +0000 Subject: [PATCH] Use nitems() from sys/param.h. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D9943 --- usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c index 94706779c20e..b88541f3a440 100644 --- a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c +++ b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c @@ -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).