]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/iucv/af_iucv.c
Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/audit
[karo-tx-linux.git] / net / iucv / af_iucv.c
index 1cd3f810723985efcbd13431e078b9885de2e2f7..2e9953b2db8402dd71c88691f263db00f2cba3e2 100644 (file)
@@ -1070,9 +1070,7 @@ static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
        txmsg.class = 0;
 
        /* iterate over control messages */
-       for (cmsg = CMSG_FIRSTHDR(msg); cmsg;
-               cmsg = CMSG_NXTHDR(msg, cmsg)) {
-
+       for_each_cmsghdr(cmsg, msg) {
                if (!CMSG_OK(msg, cmsg)) {
                        err = -EINVAL;
                        goto out;