Author: ngie Date: Wed Jan 4 17:38:18 2017 New Revision: 311291 URL: https://svnweb.freebsd.org/changeset/base/311291
Log: bridge_get_pfval: use nitems instead of spelling it out longhand MFC after: 3 days Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Wed Jan 4 17:33:18 2017 (r311290) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Wed Jan 4 17:38:18 2017 (r311291) @@ -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); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"