diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-05-11 13:16:44 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-05-11 14:08:47 +0300 |
| commit | 6006b807b1a84d31611173b837fafcd96ba9d692 (patch) | |
| tree | 08f25453328d8c408f1a8c658e4e6ef91005d4a7 /zebra/zebra_rib.c | |
| parent | f51eeb864bc821d92bd8e95670dde1258ed0747c (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 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 2732967ee6..e1da92403e 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -381,7 +381,7 @@ struct route_entry *rib_match(afi_t afi, safi_t safi, vrf_id_t vrf_id, if (!table) return 0; - memset(&p, 0, sizeof(struct prefix)); + memset(&p, 0, sizeof(p)); p.family = afi; if (afi == AFI_IP) { p.u.prefix4 = addr->ipv4; |
