git: afb001df81b4 - main - bsnmpd snmp_bridge: Remove set but unused variable.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jun 2023 16:29:37 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=afb001df81b4f69a739ee0cead50f71309f03ebb commit afb001df81b4f69a739ee0cead50f71309f03ebb Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-06-20 16:29:00 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-06-20 16:29:00 +0000 bsnmpd snmp_bridge: Remove set but unused variable. --- usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c index f3140097c5ac..57402e6a2847 100644 --- a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c +++ b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c @@ -1223,7 +1223,7 @@ bridge_getinfo_bif_ports(struct bridge_if *bif) int bridge_update_memif(struct bridge_if *bif) { - int added, updated; + int updated; uint32_t i; int32_t buf_len; struct ifbreq *b_req_buf, *b_req; @@ -1234,7 +1234,7 @@ bridge_update_memif(struct bridge_if *bif) if ((buf_len = bridge_port_get_iflist(bif, &b_req_buf)) < 0) return (-1); - added = updated = 0; + updated = 0; #define BP_FOUND 0x01 for (i = 0; i < buf_len / sizeof(struct ifbreq); i++) { @@ -1249,7 +1249,6 @@ bridge_update_memif(struct bridge_if *bif) if ((bp = bridge_port_find(m_if->index, bif)) == NULL && (bp = bridge_new_port(m_if, bif)) != NULL) { bp->status = RowStatus_active; - added++; } if (bp != NULL) {