aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/datagram.c
diff options
context:
space:
mode:
authorGu Zheng <[email protected]>2014-12-11 03:22:04 +0000
committerDavid S. Miller <[email protected]>2014-12-11 03:41:55 +0000
commitf95b414edb18de59940dcebbefb49cf25c6d505c (patch)
tree654de508641fd2c82428f43387b72fd1a3dcef42 /net/ipv6/datagram.c
parentcxgb4/cxgb4vf: global named must be unique (diff)
downloadkernel-f95b414edb18de59940dcebbefb49cf25c6d505c.tar.gz
kernel-f95b414edb18de59940dcebbefb49cf25c6d505c.zip
net: introduce helper macro for_each_cmsghdr
Introduce helper macro for_each_cmsghdr as a wrapper of the enumerating cmsghdr from msghdr, just cleanup. Signed-off-by: Gu Zheng <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv6/datagram.c')
-rw-r--r--net/ipv6/datagram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index 2464a00e36ab..100c589a2a6c 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -657,7 +657,7 @@ int ip6_datagram_send_ctl(struct net *net, struct sock *sk,
int len;
int err = 0;
- for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) {
+ for_each_cmsghdr(cmsg, msg) {
int addr_type;
if (!CMSG_OK(msg, cmsg)) {