summaryrefslogtreecommitdiffstats
path: root/watchfrr
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-05-11 12:16:44 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-05-11 13:08:47 +0200
commit6006b807b1a84d31611173b837fafcd96ba9d692 (patch)
tree08f25453328d8c408f1a8c658e4e6ef91005d4a7 /watchfrr
parentripd: Use correct usage of memcpy() when zeroing struct (diff)
downloadfrr-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 'watchfrr')
-rw-r--r--watchfrr/watchfrr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c
index 51e4f802c..fc285c748 100644
--- a/watchfrr/watchfrr.c
+++ b/watchfrr/watchfrr.c
@@ -798,7 +798,7 @@ static int try_connect(struct daemon *dmn)
zlog_debug("%s: attempting to connect", dmn->name);
dmn->connect_tries++;
- memset(&addr, 0, sizeof(struct sockaddr_un));
+ memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
snprintf(addr.sun_path, sizeof(addr.sun_path), "%s/%s.vty", gs.vtydir,
dmn->name);