From: Ondrej Zajicek Date: Tue, 28 Jul 2015 10:35:12 +0000 (+0200) Subject: Netlink: Fixes uninitialized variable X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f38795b3345c77a85084e383ee0d1449050859c;p=thirdparty%2Fbird.git Netlink: Fixes uninitialized variable Thanks to Pavel Tvrdik for the bugfix --- diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c index c4d52255c..7de15e407 100644 --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@ -100,11 +100,12 @@ nl_request_dump(int af, int cmd) struct { struct nlmsghdr nh; struct rtgenmsg g; - } req; - req.nh.nlmsg_type = cmd; - req.nh.nlmsg_len = sizeof(req); - req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP; - req.g.rtgen_family = af; + } req = { + .nh.nlmsg_type = cmd, + .nh.nlmsg_len = sizeof(req), + .nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP, + .g.rtgen_family = af + }; nl_send(&nl_scan, &req.nh); }