]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/rxrpc/ar-output.c
net: introduce helper macro for_each_cmsghdr
[mirror_ubuntu-bionic-kernel.git] / net / rxrpc / ar-output.c
index 86e0f10aa2c0b35ef4d3290f7afbbd53f31215a3..e1a9373e59799fd2a9cd998fbdc4399d2d021f6a 100644 (file)
@@ -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;