Date: Sat, 7 Jan 2017 09:11:18 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r311604 - stable/10/usr.sbin/bsnmpd/modules/snmp_bridge Message-ID: <201701070911.v079BIWj093499@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sat Jan 7 09:11:18 2017 New Revision: 311604 URL: https://svnweb.freebsd.org/changeset/base/311604 Log: MFC r311291: bridge_get_pfval: use nitems instead of spelling it out longhand Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c ============================================================================== --- stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Sat Jan 7 09:09:54 2017 (r311603) +++ stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Sat Jan 7 09:11:18 2017 (r311604) @@ -1449,8 +1449,8 @@ static struct { int32_t bridge_get_pfval(uint8_t which) { - if (which > sizeof(bridge_pf_sysctl) / sizeof(bridge_pf_sysctl[0]) - || which < 1) + + if (which > nitems(bridge_pf_sysctl) || which < 1) return (-1); return (bridge_pf_sysctl[which - 1].val);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701070911.v079BIWj093499>