Date: Wed, 4 Jan 2017 17:38:18 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311291 - head/usr.sbin/bsnmpd/modules/snmp_bridge Message-ID: <201701041738.v04HcIcj006206@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701041738.v04HcIcj006206>