summaryrefslogtreecommitdiff
path: root/lib/table.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2022-05-13 07:40:58 -0400
committerGitHub <noreply@github.com>2022-05-13 07:40:58 -0400
commitf205a2309c7dc961216417fb49b4639892b219be (patch)
tree9a9839c3e141e990c96c43a1788ce9c6d95ea84b /lib/table.c
parent69df174216b5829d3075765e0dba30d16f20e25c (diff)
parent6006b807b1a84d31611173b837fafcd96ba9d692 (diff)
Merge pull request #11177 from opensourcerouting/fix/memset_memcpy
*: memcpy/memset zeroing
Diffstat (limited to 'lib/table.c')
-rw-r--r--lib/table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/table.c b/lib/table.c
index 523183bef2..6c4c6c7d36 100644
--- a/lib/table.c
+++ b/lib/table.c
@@ -228,7 +228,7 @@ struct route_node *route_node_match_ipv4(struct route_table *table,
{
struct prefix_ipv4 p;
- memset(&p, 0, sizeof(struct prefix_ipv4));
+ memset(&p, 0, sizeof(p));
p.family = AF_INET;
p.prefixlen = IPV4_MAX_BITLEN;
p.prefix = *addr;
@@ -241,7 +241,7 @@ struct route_node *route_node_match_ipv6(struct route_table *table,
{
struct prefix_ipv6 p;
- memset(&p, 0, sizeof(struct prefix_ipv6));
+ memset(&p, 0, sizeof(p));
p.family = AF_INET6;
p.prefixlen = IPV6_MAX_BITLEN;
p.prefix = *addr;