]> 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)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 28 Jul 2015 10:36:03 +0000 (12:36 +0200)
Thanks to Pavel Tvrdik for the bugfix

sysdep/linux/netlink.c

index 9f206e1cab863f675e4112dbf4673962c9b826a7..9c9449e2c41cd7d03ce8d411244cac546372a807 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);
 }