From owner-svn-src-head@freebsd.org Sun Mar 12 03:43:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40792D0837F; Sun, 12 Mar 2017 03:43:30 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CEFF125E; Sun, 12 Mar 2017 03:43:29 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2C3hTWs024838; Sun, 12 Mar 2017 03:43:29 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3hTIL024837; Sun, 12 Mar 2017 03:43:29 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201703120343.v2C3hTIL024837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sun, 12 Mar 2017 03:43:29 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 03:43:30 -0000 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).