artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
557a2e7
)
When the three possible return values are -1, 0, and 1, != 1 is the same
author
krw
<krw@openbsd.org>
Sun, 13 Jul 2014 16:43:25 +0000
(16:43 +0000)
committer
krw
<krw@openbsd.org>
Sun, 13 Jul 2014 16:43:25 +0000
(16:43 +0000)
as <= 0. And the latter is the normal idiom so use that.
ok claudio@ henning@
usr.sbin/ldapd/imsgev.c
patch
|
blob
|
history
diff --git
a/usr.sbin/ldapd/imsgev.c
b/usr.sbin/ldapd/imsgev.c
index
36e9fcb
..
6daa4d1
100644
(file)
--- 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;
}