From f1447e0e75a4ccf9ad6c8802b13f12f8a0f901b8 Mon Sep 17 00:00:00 2001 From: Sunil Nimmagadda Date: Sat, 23 Aug 2014 09:19:20 +0500 Subject: 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@ --- imsgev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'imsgev.c') diff --git a/imsgev.c b/imsgev.c index 6b92d79..6daa4d1 100644 --- a/imsgev.c +++ b/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) { + if ((n = msgbuf_write(&ibuf->w)) <= 0 && errno != EAGAIN) { imsgev_disconnect(iev, IMSGEV_EWRITE); return; } -- cgit v1.2.3