diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-05-11 12:16:44 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-05-11 13:08:47 +0200 |
commit | 6006b807b1a84d31611173b837fafcd96ba9d692 (patch) | |
tree | 08f25453328d8c408f1a8c658e4e6ef91005d4a7 /ospf6d/ospf6_auth_trailer.c | |
parent | ripd: Use correct usage of memcpy() when zeroing struct (diff) | |
download | frr-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_auth_trailer.c')
-rw-r--r-- | ospf6d/ospf6_auth_trailer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ospf6d/ospf6_auth_trailer.c b/ospf6d/ospf6_auth_trailer.c index 1f3f87751..77ac4a187 100644 --- a/ospf6d/ospf6_auth_trailer.c +++ b/ospf6d/ospf6_auth_trailer.c @@ -406,7 +406,7 @@ int ospf6_auth_validate_pkt(struct ospf6_interface *oi, unsigned int *pkt_len, return OSPF6_AUTH_VALIDATE_FAILURE; } - memset(&ospf6_auth_info, 0, sizeof(struct ospf6_auth_hdr)); + memset(&ospf6_auth_info, 0, sizeof(ospf6_auth_info)); if ((*pkt_len - hdr_len - (*lls_block_len)) > sizeof(ospf6_auth_info)) { if (IS_OSPF6_DEBUG_AUTH_RX) zlog_err("RECV[%s] : Wrong auth data in %s packet", |