diff options
author | Коренберг Марк (ноутбук дома) <socketpair@gmail.com> | 2012-09-10 01:33:04 +0600 |
---|---|---|
committer | Коренберг Марк (дома) <socketpair@gmail.com> | 2012-10-19 22:32:59 +0600 |
commit | e1b67fb23f8f802f3b287c66fda531e002ca20d7 (patch) | |
tree | 51149c3f29d656b5e510fa69baf160c1fd82149d /lib/nl.c | |
parent | fedb862ea5a46df327a4de75e613e2d7732e8b46 (diff) | |
download | libnl-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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |