vss.c recv_afs_msg(): Set cmsg only once.
authorAndre Noll <maan@systemlinux.org>
Sun, 28 Oct 2007 01:52:08 +0000 (02:52 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 28 Oct 2007 01:52:08 +0000 (02:52 +0100)
vss.c

diff --git a/vss.c b/vss.c
index 03621e0..ee63d10 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -347,7 +347,6 @@ static int recv_afs_msg(int *fd, uint32_t *code, uint32_t *data)
                return -E_SHORT_AFS_READ;
        *code = *(uint32_t*)buf;
        *data =  *(uint32_t*)(buf + 4);
-       cmsg = CMSG_FIRSTHDR(&msg);
        for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
                if (cmsg->cmsg_level != SOL_SOCKET
                        || cmsg->cmsg_type != SCM_RIGHTS)