summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_top.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-05-11 12:16:44 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-05-11 13:08:47 +0200
commit6006b807b1a84d31611173b837fafcd96ba9d692 (patch)
tree08f25453328d8c408f1a8c658e4e6ef91005d4a7 /ospf6d/ospf6_top.c
parentripd: Use correct usage of memcpy() when zeroing struct (diff)
downloadfrr-6006b807b1a84d31611173b837fafcd96ba9d692.tar.xz
frr-6006b807b1a84d31611173b837fafcd96ba9d692.zip
*: Properly use memset() when zeroing
Wrong: memset(&a, 0, sizeof(struct ...)); Good: memset(&a, 0, sizeof(a)); Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_top.c')
-rw-r--r--ospf6d/ospf6_top.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 634eabbf7..8f482d707 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -579,7 +579,7 @@ static void ospf6_disable(struct ospf6 *o)
void ospf6_master_init(struct thread_master *master)
{
- memset(&ospf6_master, 0, sizeof(struct ospf6_master));
+ memset(&ospf6_master, 0, sizeof(ospf6_master));
om6 = &ospf6_master;
om6->ospf6 = list_new();
@@ -1758,7 +1758,7 @@ bool ospf6_is_valid_summary_addr(struct vty *vty, struct prefix *p)
{
struct in6_addr addr_zero;
- memset(&addr_zero, 0, sizeof(struct in6_addr));
+ memset(&addr_zero, 0, sizeof(addr_zero));
/* Default prefix validation*/
if ((is_default_prefix(p)) ||