bgpd, zebra: fix struct/pointer sizeof mixups
Two places were taking sizeof(pointer) instead of the sizeof(struct),
while performing operations on the struct. Both are initialisation
functions; I guess we haven't seen fallout since they weren't critical.
Fix anyway.
[v2: fix mistake that actually broke bgpd RS workqueue init]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/zebra/router-id.c b/zebra/router-id.c
index 94a2941..bfafc27 100644
--- a/zebra/router-id.c
+++ b/zebra/router-id.c
@@ -245,8 +245,8 @@
install_element (CONFIG_NODE, &router_id_cmd);
install_element (CONFIG_NODE, &no_router_id_cmd);
- memset (rid_all_sorted_list, 0, sizeof (rid_all_sorted_list));
- memset (rid_lo_sorted_list, 0, sizeof (rid_lo_sorted_list));
+ memset (rid_all_sorted_list, 0, sizeof (*rid_all_sorted_list));
+ memset (rid_lo_sorted_list, 0, sizeof (*rid_lo_sorted_list));
memset (&rid_user_assigned, 0, sizeof (rid_user_assigned));
rid_all_sorted_list->cmp = router_id_cmp;