audit: pass int* to nlmsg_next
authorAlexandru Copot <alex.mihai.c@gmail.com>
Thu, 28 Mar 2013 21:31:29 +0000 (23:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Mar 2013 21:40:08 +0000 (17:40 -0400)
Commit 941912133025926307c7a65b203fa38403b1063a replaced the macros
NLMSG_NEXT with calls to nlmsg_next which produces this warning:

kernel/audit.c: In function ‘audit_receive_skb’:
kernel/audit.c:928:3: warning: passing argument 2 of ‘nlmsg_next’ makes pointer from integer without a cast
In file included from include/net/rtnetlink.h:5:0,
                 from include/net/neighbour.h:28,
                 from include/net/dst.h:17,
                 from include/net/sock.h:68,
                 from kernel/audit.c:55:
include/net/netlink.h:359:1: note: expected ‘int *’ but argument is of type ‘int’

Fix this by sending the intended pointer.

Signed-off-by: Alexandru Copot <alex.mihai.c@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/audit.c

index 4dbb0470006ebd8d821d72788536048d713ef2fb..488f85f76335cfa609da70ee96e6cc46646ed7fa 100644 (file)
@@ -925,7 +925,7 @@ static void audit_receive_skb(struct sk_buff *skb)
                if (err || (nlh->nlmsg_flags & NLM_F_ACK))
                        netlink_ack(skb, nlh, err);
 
-               nlh = nlmsg_next(nlh, len);
+               nlh = nlmsg_next(nlh, &len);
        }
 }