diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2024-09-25 12:08:03 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-09-25 12:08:03 -0400 |
| commit | 659cd66427ac8a6fe705b4a319245b7c88f80c05 (patch) | |
| tree | 5ad87c486844ab68442265348b7cce00fb26bce2 | |
| parent | ecd9d441b082e3f24139eb96915b18fc17996c08 (diff) | |
zebra: Let's use memset instead of walking bytes and setting to 0
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| -rw-r--r-- | zebra/zebra_snmp.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c index 5a99ac0500..b596d00c50 100644 --- a/zebra/zebra_snmp.c +++ b/zebra/zebra_snmp.c @@ -300,14 +300,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; |
