From a52fbfbaa6cb040819aaa956af20324f4cf1b1f9 Mon Sep 17 00:00:00 2001 From: araujo Date: Mon, 17 Apr 2017 18:55:54 +0000 Subject: 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 --- usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/bsnmpd') 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). -- cgit v1.1