diff options
| author | Gu Zheng <[email protected]> | 2014-12-11 03:22:04 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2014-12-11 03:41:55 +0000 |
| commit | f95b414edb18de59940dcebbefb49cf25c6d505c (patch) | |
| tree | 654de508641fd2c82428f43387b72fd1a3dcef42 /net/rds/send.c | |
| parent | cxgb4/cxgb4vf: global named must be unique (diff) | |
| download | kernel-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/rds/send.c')
| -rw-r--r-- | net/rds/send.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/send.c b/net/rds/send.c index 40a5629a0a13..42f65d4305c8 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -826,7 +826,7 @@ static int rds_rm_size(struct msghdr *msg, int data_len) int cmsg_groups = 0; int retval; - for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { + for_each_cmsghdr(cmsg, msg) { if (!CMSG_OK(msg, cmsg)) return -EINVAL; @@ -878,7 +878,7 @@ static int rds_cmsg_send(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg; int ret = 0; - for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { + for_each_cmsghdr(cmsg, msg) { if (!CMSG_OK(msg, cmsg)) return -EINVAL; |
