summary refs log tree commit diff
path: root/bin/dtch.c
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2017-09-26 14:15:24 -0400
committerJune McEnroe <programble@gmail.com>2017-09-26 14:17:11 -0400
commit2c0c43bb0070682421cff6a0e6b022a490723d8c (patch)
treef8ff772b1a7838bd095277956156024eca694a13 /bin/dtch.c
parentSimplify bins Makefile (diff)
downloadsrc-2c0c43bb0070682421cff6a0e6b022a490723d8c.tar.gz
src-2c0c43bb0070682421cff6a0e6b022a490723d8c.zip
Remove use of EBADMSG
Not defined on OpenBSD, doesn't matter much.
Diffstat (limited to 'bin/dtch.c')
-rw-r--r--bin/dtch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/dtch.c b/bin/dtch.c
index 4714f748..5b920a31 100644
--- a/bin/dtch.c
+++ b/bin/dtch.c
@@ -99,8 +99,10 @@ static int recvFd(int sock) {
     if (n < 0) return -1;
 
     struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg);
-    if (!cmsg) { errno = ENOMSG; return -1; }
-    if (cmsg->cmsg_type != SCM_RIGHTS) { errno = EBADMSG; return -1; }
+    if (!cmsg || cmsg->cmsg_type != SCM_RIGHTS) {
+        errno = ENOMSG;
+        return -1;
+    }
 
     return *(int *)CMSG_DATA(cmsg);
 }
2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe