From 2c0c43bb0070682421cff6a0e6b022a490723d8c Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Tue, 26 Sep 2017 14:15:24 -0400 Subject: Remove use of EBADMSG Not defined on OpenBSD, doesn't matter much. --- bin/dtch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin') 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); } -- cgit 1.4.1 lue='cgi'>cgi collaborative ASCII art
summary refs log tree commit diff homepage
path: root/server.c (unfollow)
Commit message (Expand)Author
2017-08-08Completely retry if a send fails during a broadcastJune McEnroe
2017-08-08Reverse order of main loopJune McEnroe
2017-08-08Turn off SIGPIPE at the socket levelJune McEnroe
2017-08-06Rewrite helpJune McEnroe
2017-08-04Use $() in snapshot.shJune McEnroe
2017-08-02Move in insert direction on ~June McEnroe
2017-08-02Preserve color on replaceJune McEnroe
2017-08-02Split tile access and modifyJune McEnroe
2017-08-01Madvise RANDOM and NOSYNCJune McEnroe
2017-07-31Fix removing clients from clientCastJune McEnroe
2017-07-31Build with debug infoJune McEnroe
2017-07-31Don't dump tiles in coreJune McEnroe
2017-07-31Use designated initializers for messagesJune McEnroe
2017-07-31Show other clients' cursorsJune McEnroe
2017-07-31Perform enter as two moves rather than a loopJune McEnroe
2017-07-31Track tile access countsJune McEnroe
2017-07-31Adjust move speed in clientJune McEnroe
2017-07-31Handle large movesJune McEnroe
2017-07-30Optimize builds for chrootJune McEnroe
2017-07-30Persist bright across color changesJune McEnroe
2017-07-30Add index.htmlJune McEnroe
2017-07-30Add snapshot.shJune McEnroe
2017-07-30Fix termcap patch for background colorsJune McEnroe
2017-07-30Update helpJune McEnroe
2017-07-30Fix help to track colorJune McEnroe
2017-07-30Support background colorsJune McEnroe
2017-07-30Track color only client-sideJune McEnroe
2017-07-30Add ostensible support for background colorsJune McEnroe
2017-07-30Add tile create and access timestampsJune McEnroe
2017-07-30Assert stable struct Tile field offsetsJune McEnroe
2017-07-30Add chroot.shJune McEnroe
2017-07-30Add ` commandJune McEnroe
2017-07-30Add sshd_configJune McEnroe
2017-07-30Add termcap patchJune McEnroe