summaryrefslogtreecommitdiff
path: root/ospfd/ospf_sr.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-05-11 13:16:44 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-05-11 14:08:47 +0300
commit6006b807b1a84d31611173b837fafcd96ba9d692 (patch)
tree08f25453328d8c408f1a8c658e4e6ef91005d4a7 /ospfd/ospf_sr.c
parentf51eeb864bc821d92bd8e95670dde1258ed0747c (diff)
*: 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 'ospfd/ospf_sr.c')
-rw-r--r--ospfd/ospf_sr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c
index 090a655cee..8fa5ce77bb 100644
--- a/ospfd/ospf_sr.c
+++ b/ospfd/ospf_sr.c
@@ -608,7 +608,7 @@ int ospf_sr_init(void)
osr_debug("SR (%s): Initialize SR Data Base", __func__);
- memset(&OspfSR, 0, sizeof(struct ospf_sr_db));
+ memset(&OspfSR, 0, sizeof(OspfSR));
OspfSR.status = SR_OFF;
/* Only AREA flooding is supported in this release */
OspfSR.scope = OSPF_OPAQUE_AREA_LSA;