diff options
author | Gu Zheng <guz.fnst@cn.fujitsu.com> | 2014-12-11 04:22:04 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-11 04:41:55 +0100 |
commit | f95b414edb18de59940dcebbefb49cf25c6d505c (patch) | |
tree | 654de508641fd2c82428f43387b72fd1a3dcef42 /net/rxrpc | |
parent | cxgb4/cxgb4vf: global named must be unique (diff) | |
download | linux-f95b414edb18de59940dcebbefb49cf25c6d505c.tar.xz linux-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 <guz.fnst@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc')
-rw-r--r-- | net/rxrpc/ar-output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/ar-output.c index 86e0f10aa2c0..e1a9373e5979 100644 --- a/net/rxrpc/ar-output.c +++ b/net/rxrpc/ar-output.c @@ -45,7 +45,7 @@ static int rxrpc_sendmsg_cmsg(struct rxrpc_sock *rx, struct msghdr *msg, if (msg->msg_controllen == 0) return -EINVAL; - for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { + for_each_cmsghdr(cmsg, msg) { if (!CMSG_OK(msg, cmsg)) return -EINVAL; |