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/core/scm.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/core/scm.c')
| -rw-r--r-- | net/core/scm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/scm.c b/net/core/scm.c index b442e7e25e60..3b6899b7d810 100644 --- a/net/core/scm.c +++ b/net/core/scm.c @@ -129,8 +129,7 @@ int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p) struct cmsghdr *cmsg; int err; - for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) - { + for_each_cmsghdr(cmsg, msg) { err = -EINVAL; /* Verify that cmsg_len is at least sizeof(struct cmsghdr) */ |
