diff options
author | Gu Zheng <guz.fnst@cn.fujitsu.com> | 2014-12-11 06:22:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-11 06:41:55 +0300 |
commit | f95b414edb18de59940dcebbefb49cf25c6d505c (patch) | |
tree | 654de508641fd2c82428f43387b72fd1a3dcef42 /net/iucv/af_iucv.c | |
parent | dd0bcc0bc842e0d2c981102376d867c1a8bad320 (diff) | |
download | linux-f95b414edb18de59940dcebbefb49cf25c6d505c.tar.xz |
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 <guz.fnst@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/iucv/af_iucv.c')
-rw-r--r-- | net/iucv/af_iucv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 1cd3f8107239..2e9953b2db84 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -1070,9 +1070,7 @@ static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock, txmsg.class = 0; /* iterate over control messages */ - for (cmsg = CMSG_FIRSTHDR(msg); cmsg; - cmsg = CMSG_NXTHDR(msg, cmsg)) { - + for_each_cmsghdr(cmsg, msg) { if (!CMSG_OK(msg, cmsg)) { err = -EINVAL; goto out; |