Date: Wed, 4 Jan 2017 17:54:44 +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: r311294 - head/usr.sbin/bsnmpd/modules/snmp_bridge Message-ID: <201701041754.v04Hsifb014193@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Wed Jan 4 17:54:44 2017 New Revision: 311294 URL: https://svnweb.freebsd.org/changeset/base/311294 Log: style cleanup - bridge_pf_dump: use nitems instead of spelling it out longhand - bridge_do_pfctl: sort variables by alignment for type MFC after: 1 week 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:50:52 2017 (r311293) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Wed Jan 4 17:54:44 2017 (r311294) @@ -1460,8 +1460,8 @@ int32_t bridge_do_pfctl(int32_t bridge_ctl, enum snmp_op op, int32_t *val) { char *mib_oid; - int32_t i, s_i; size_t len, s_len; + int32_t i, s_i; if (bridge_ctl >= LEAF_begemotBridgeLayer2PfStatus) return (-2); @@ -1500,8 +1500,7 @@ bridge_pf_dump(void) { uint8_t i; - for (i = 0; i < sizeof(bridge_pf_sysctl) / sizeof(bridge_pf_sysctl[0]); - i++) { + for (i = 0; i < nitems(bridge_pf_sysctl); i++) { syslog(LOG_ERR, "%s%s = %d", bridge_sysctl, bridge_pf_sysctl[i].name, bridge_pf_sysctl[i].val); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701041754.v04Hsifb014193>