]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
af_unix: fix return value
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 11 Mar 2020 01:35:51 +0000 (02:35 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 11 Mar 2020 01:35:51 +0000 (02:35 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/af_unix.c

index e70e0c9e224ee35407faa780a8d187b1e9cbb70d..04aef44ade9319b93f83bb6827d4288afe4e7456 100644 (file)
@@ -191,9 +191,8 @@ static int lxc_abstract_unix_recv_fds_iov(int fd, int *recvfds, int num_recvfds,
        do {
                ret = recvmsg(fd, &msg, 0);
        } while (ret < 0 && errno == EINTR);
-       if (!ret)
-               return 0;
-
+       if (ret < 0 || ret == 0)
+               return ret;
 
        /*
         * If SO_PASSCRED is set we will always get a ucred message.