summaryrefslogtreecommitdiff
path: root/zebra/zebra_snmp.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-09-25 12:08:03 -0400
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-09-25 18:52:53 +0000
commitec86d6f09b7c9c655e499a6c7864ce964154ecca (patch)
tree9e0df68c3460a9f4bfe7d51ecb8f1b6b3db58a69 /zebra/zebra_snmp.c
parenta473cafdfabbdb55eef51e2332055ba5c10d85f2 (diff)
zebra: Let's use memset instead of walking bytes and setting to 0
Signed-off-by: Donald Sharp <sharpd@nvidia.com> (cherry picked from commit 659cd66427ac8a6fe705b4a319245b7c88f80c05)
Diffstat (limited to 'zebra/zebra_snmp.c')
-rw-r--r--zebra/zebra_snmp.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c
index 1b5c2e305a..cd06cb8eec 100644
--- a/zebra/zebra_snmp.c
+++ b/zebra/zebra_snmp.c
@@ -313,14 +313,8 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
int i;
/* Init index variables */
-
- pnt = (uint8_t *)&dest;
- for (i = 0; i < 4; i++)
- *pnt++ = 0;
-
- pnt = (uint8_t *)&nexthop;
- for (i = 0; i < 4; i++)
- *pnt++ = 0;
+ memset(&dest, 0, sizeof(dest));
+ memset(&nexthop, 0, sizeof(nexthop));
proto = 0;
policy = 0;