svn commit: r311604 - stable/10/usr.sbin/bsnmpd/modules/snmp_bridge
Ngie Cooper
ngie at FreeBSD.org
Sat Jan 7 09:11:19 UTC 2017
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);
More information about the svn-src-stable
mailing list