summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsnmpd/modules/snmp_hostres
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2017-04-17 18:55:54 +0000
committeraraujo <araujo@FreeBSD.org>2017-04-17 18:55:54 +0000
commita52fbfbaa6cb040819aaa956af20324f4cf1b1f9 (patch)
tree647b1c8fb6ffc61d7646056b90483cfd245a7867 /usr.sbin/bsnmpd/modules/snmp_hostres
parent1e35d29d6289b2c15cca0f7e951e77e144f0b08e (diff)
downloadFreeBSD-src-a52fbfbaa6cb040819aaa956af20324f4cf1b1f9.zip
FreeBSD-src-a52fbfbaa6cb040819aaa956af20324f4cf1b1f9.tar.gz
MFC r314987-r314989, r314993-r314994, r315046-r315049, r315102
r314987: Use nitems() from sys/param.h. Reviewed by: asomers MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9944 r314988: Use nitems() from sys/param.h. Reviewed by: ume MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9938 r314989: Use nitems() from sys/param.h and also remove the cast. Reviewed by: markj MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9937 r314993: Use nitems() from sys/param.h. Reviewed by: ngie MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9936 r314994: Use nitems() from sys/param.h. Reviewed by: ngie MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9940 r315046: Use nitems() from sys/param.h Reviewed by: jhb MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9941 r315047: Use nitems() from sys/param.h. Reviewed by: np MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9945 r315048: Use nitems() from sys/param.h. MFC after: 3 weeks. r315049: Bring back the cast removed in my previous commit to allow us build vmstat with WARNS 2. This cast was first introduced at r87690. Reported by: bde, pfg and ngie MFC after: 3 weeks. r315102: Use nitems() from sys/param.h. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D9943
Diffstat (limited to 'usr.sbin/bsnmpd/modules/snmp_hostres')
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c2
1 files changed, 1 insertions, 1 deletions
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 9470677..b88541f 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).
OpenPOWER on IntegriCloud