diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-07-13 16:43:26 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-07-13 16:43:26 +0000 |
commit | 9e674df7677cd64c9503808a4effbf3e455e3490 (patch) | |
tree | 42ef7720e2126a6ec7ed327aafa3cd57ab8e8dd9 /usr.sbin/ldapd | |
parent | 0a62e3699149faa5ecee87ff710c406eb40e9d64 (diff) |
When the three possible return values are -1, 0, and 1, != 1 is the same
as <= 0. And the latter is the normal idiom so use that.
ok claudio@ henning@
Diffstat (limited to 'usr.sbin/ldapd')
-rw-r--r-- | usr.sbin/ldapd/imsgev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/ldapd/imsgev.c b/usr.sbin/ldapd/imsgev.c index 36e9fcbf3aa..6daa4d1d397 100644 --- a/usr.sbin/ldapd/imsgev.c +++ b/usr.sbin/ldapd/imsgev.c @@ -138,7 +138,7 @@ imsgev_dispatch(int fd, short ev, void *humppa) * closed, or some error occured. Both case are not recoverable * from the imsg perspective, so we treat it as a WRITE error. */ - if ((n = msgbuf_write(&ibuf->w)) != 1 && errno != EAGAIN) { + if ((n = msgbuf_write(&ibuf->w)) <= 0 && errno != EAGAIN) { imsgev_disconnect(iev, IMSGEV_EWRITE); return; } |