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 /bgpd/rfp-example | |
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 'bgpd/rfp-example')
-rw-r--r-- | bgpd/rfp-example/librfp/rfp_example.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/rfp-example/librfp/rfp_example.c b/bgpd/rfp-example/librfp/rfp_example.c index 060fc7655..9a4ec7dbf 100644 --- a/bgpd/rfp-example/librfp/rfp_example.c +++ b/bgpd/rfp-example/librfp/rfp_example.c @@ -287,7 +287,7 @@ static int rfp_cfg_write_cb(struct vty *vty, void *rfp_start_val) void *rfp_start(struct thread_master *master, struct rfapi_rfp_cfg **cfgp, struct rfapi_rfp_cb_methods **cbmp) { - memset(&global_rfi, 0, sizeof(struct rfp_instance_t)); + memset(&global_rfi, 0, sizeof(global_rfi)); global_rfi.master = master; /* for BGPD threads */ /* initilize struct rfapi_rfp_cfg, see rfapi.h */ |