summaryrefslogtreecommitdiff
path: root/src/sysdeps/tryancilautoclose.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdeps/tryancilautoclose.c')
-rw-r--r--src/sysdeps/tryancilautoclose.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sysdeps/tryancilautoclose.c b/src/sysdeps/tryancilautoclose.c
index c58e3b8..53b768d 100644
--- a/src/sysdeps/tryancilautoclose.c
+++ b/src/sysdeps/tryancilautoclose.c
@@ -48,7 +48,8 @@ static int ancil_send_fd (int sock, int fd)
cmsg->cmsg_level = SOL_SOCKET ;
cmsg->cmsg_type = SCM_RIGHTS ;
*((int *)CMSG_DATA(cmsg)) = fd ;
- return (sendmsg(sock, &msghdr, 0) >= 0) ;
+ if (sendmsg(sock, &msghdr, 0) < 0) return 0 ;
+ return 1 ;
}
static int ancil_recv_fd (int sock)