diff options
author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2014-08-23 09:19:20 +0500 |
---|---|---|
committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2014-08-23 09:19:20 +0500 |
commit | f1447e0e75a4ccf9ad6c8802b13f12f8a0f901b8 (patch) | |
tree | 1f18af4aaa3b2b2ebe88cff1a67d9e82697b4907 | |
parent | 66a429c7c9fc3b167160b2d9b82d418e8accde8d (diff) |
Latest changes from upstream with commit message...
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@
-rw-r--r-- | imsgev.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) { + if ((n = msgbuf_write(&ibuf->w)) <= 0 && errno != EAGAIN) { imsgev_disconnect(iev, IMSGEV_EWRITE); return; } |