diff options
author | Gu Zheng <guz.fnst@cn.fujitsu.com> | 2014-12-10 22:22:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-10 22:41:55 -0500 |
commit | f95b414edb18de59940dcebbefb49cf25c6d505c (patch) | |
tree | 654de508641fd2c82428f43387b72fd1a3dcef42 /net/iucv | |
parent | dd0bcc0bc842e0d2c981102376d867c1a8bad320 (diff) |
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')
-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, | |||
1070 | txmsg.class = 0; | 1070 | txmsg.class = 0; |
1071 | 1071 | ||
1072 | /* iterate over control messages */ | 1072 | /* iterate over control messages */ |
1073 | for (cmsg = CMSG_FIRSTHDR(msg); cmsg; | 1073 | for_each_cmsghdr(cmsg, msg) { |
1074 | cmsg = CMSG_NXTHDR(msg, cmsg)) { | ||
1075 | |||
1076 | if (!CMSG_OK(msg, cmsg)) { | 1074 | if (!CMSG_OK(msg, cmsg)) { |
1077 | err = -EINVAL; | 1075 | err = -EINVAL; |
1078 | goto out; | 1076 | goto out; |