summaryrefslogtreecommitdiffstats
path: root/libexec/spamd
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2017-01-23 09:21:04 +0000
committerbeck <beck@openbsd.org>2017-01-23 09:21:04 +0000
commit2b4c1c4cd5e39e69728e03b832d34286bfaf6f68 (patch)
treecfcebac60a9294fa97b3f54c1907a38bc7e59179 /libexec/spamd
parentAssert for IPL_SOFTNET rather than raising SPL recursively. (diff)
downloadwireguard-openbsd-2b4c1c4cd5e39e69728e03b832d34286bfaf6f68.tar.xz
wireguard-openbsd-2b4c1c4cd5e39e69728e03b832d34286bfaf6f68.zip
check EAGAIN in the correct place,
noticed and ok phessler@
Diffstat (limited to 'libexec/spamd')
-rw-r--r--libexec/spamd/spamd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index 6f33b33084c..12bf20915e6 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.149 2017/01/23 09:09:15 beck Exp $ */
+/* $OpenBSD: spamd.c,v 1.150 2017/01/23 09:21:04 beck Exp $ */
/*
* Copyright (c) 2015 Henning Brauer <henning@openbsd.org>
@@ -1099,9 +1099,9 @@ handler(struct con *cp)
if (n == 0)
closecon(cp);
- if (errno == EAGAIN)
- return;
else if (n == -1) {
+ if (errno == EAGAIN)
+ return;
if (debug > 0)
warn("read");
closecon(cp);