diff options
author | Gu Zheng <guz.fnst@cn.fujitsu.com> | 2014-12-11 11:22:04 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-10 22:41:55 -0500 |
commit | f95b414edb18de59940dcebbefb49cf25c6d505c (patch) | |
tree | 654de508641fd2c82428f43387b72fd1a3dcef42 /crypto/af_alg.c | |
parent | dd0bcc0bc842e0d2c981102376d867c1a8bad320 (diff) | |
download | linux-f95b414edb18de59940dcebbefb49cf25c6d505c.tar.bz2 |
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 'crypto/af_alg.c')
-rw-r--r-- | crypto/af_alg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 6a3ad8011585..bc21f520d489 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -399,7 +399,7 @@ int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con) { struct cmsghdr *cmsg; - for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { + for_each_cmsghdr(cmsg, msg) { if (!CMSG_OK(msg, cmsg)) return -EINVAL; if (cmsg->cmsg_level != SOL_ALG) |