summaryrefslogtreecommitdiff
path: root/lib/nl.c
diff options
context:
space:
mode:
authorКоренберг Марк (ноутбук дома) <socketpair@gmail.com>2012-09-10 01:33:04 +0600
committerКоренберг Марк (дома) <socketpair@gmail.com>2012-10-19 22:32:59 +0600
commite1b67fb23f8f802f3b287c66fda531e002ca20d7 (patch)
tree51149c3f29d656b5e510fa69baf160c1fd82149d /lib/nl.c
parentfedb862ea5a46df327a4de75e613e2d7732e8b46 (diff)
downloadlibnl-e1b67fb23f8f802f3b287c66fda531e002ca20d7.tar.gz
Clang diagnostics
Based on clang diagnostics: 1. lib/nl.c: recvmsgs(): nla filling with zeros commented. 2. lib/route/classid.c: & lib/route/pktloc.c: remove zero-filling of struct stat 3. lib/route/qdisc/htb.c: Fix htb_qdisc_msg_fill(): fix zero-filling 4. ematch/container.c: container_parse: commented why only 4 bytes are copied len marked as unused to eliminate compiler warning
Diffstat (limited to 'lib/nl.c')
-rw-r--r--lib/nl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/nl.c b/lib/nl.c
index 5b37c2a3..2fa741f0 100644
--- a/lib/nl.c
+++ b/lib/nl.c
@@ -540,6 +540,12 @@ static int recvmsgs(struct nl_sock *sk, struct nl_cb *cb)
int n, err = 0, multipart = 0, interrupted = 0, nrecv = 0;
unsigned char *buf = NULL;
struct nlmsghdr *hdr;
+
+ /*
+ nla is passed on to not only to nl_recv() but may also be passed
+ to a function pointer provided by the caller which may or may not
+ initialize the variable. Thomas Graf.
+ */
struct sockaddr_nl nla = {0};
struct nl_msg *msg = NULL;
struct ucred *creds = NULL;