]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Netlink: Fixes uninitialized variable
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 28 Jul 2015 10:35:12 +0000 (12:35 +0200)
committerPavel Tvrdík <pawel.tvrdik@gmail.cz>
Thu, 13 Aug 2015 12:38:41 +0000 (14:38 +0200)
Thanks to Pavel Tvrdik for the bugfix

sysdep/linux/netlink.c

index c4d52255ca837586ddbaf66772a9afad891715f9..7de15e407f42878044e1234a532689b048f6f593 100644 (file)
@@ -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);
 }