diff options
author | Donald Sharp <donaldsharp72@gmail.com> | 2022-05-13 13:40:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 13:40:58 +0200 |
commit | f205a2309c7dc961216417fb49b4639892b219be (patch) | |
tree | 9a9839c3e141e990c96c43a1788ce9c6d95ea84b /bgpd/bgp_debug.c | |
parent | Merge pull request #11188 from opensourcerouting/fix/argv_find (diff) | |
parent | *: Properly use memset() when zeroing (diff) | |
download | frr-f205a2309c7dc961216417fb49b4639892b219be.tar.xz frr-f205a2309c7dc961216417fb49b4639892b219be.zip |
Merge pull request #11177 from opensourcerouting/fix/memset_memcpy
*: memcpy/memset zeroing
Diffstat (limited to 'bgpd/bgp_debug.c')
-rw-r--r-- | bgpd/bgp_debug.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 7712274b5..57f37c173 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -639,7 +639,7 @@ static int bgp_debug_parse_evpn_prefix(struct vty *vty, struct cmd_token **argv, return CMD_WARNING; if (evpn_type == BGP_EVPN_MAC_IP_ROUTE) { - memset(&ip, 0, sizeof(struct ipaddr)); + memset(&ip, 0, sizeof(ip)); if (argv_find(argv, argc, "mac", &mac_idx)) if (!prefix_str2mac(argv[mac_idx + 1]->arg, &mac)) { @@ -656,7 +656,7 @@ static int bgp_debug_parse_evpn_prefix(struct vty *vty, struct cmd_token **argv, build_evpn_type2_prefix((struct prefix_evpn *)argv_p, &mac, &ip); } else if (evpn_type == BGP_EVPN_IMET_ROUTE) { - memset(&ip, 0, sizeof(struct ipaddr)); + memset(&ip, 0, sizeof(ip)); if (argv_find(argv, argc, "ip", &ip_idx)) if (str2ipaddr(argv[ip_idx + 1]->arg, &ip) != 0) { @@ -669,7 +669,7 @@ static int bgp_debug_parse_evpn_prefix(struct vty *vty, struct cmd_token **argv, } else if (evpn_type == BGP_EVPN_IP_PREFIX_ROUTE) { struct prefix ip_prefix; - memset(&ip_prefix, 0, sizeof(struct prefix)); + memset(&ip_prefix, 0, sizeof(ip_prefix)); if (argv_find(argv, argc, "ip", &ip_idx)) { (void)str2prefix(argv[ip_idx + 1]->arg, &ip_prefix); apply_mask(&ip_prefix); |