summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syslogd
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2005-09-28 16:14:43 +0000
committercognet <cognet@FreeBSD.org>2005-09-28 16:14:43 +0000
commit60f0244e876cfe471dd5223cdf47bcfbba1d767b (patch)
tree7b80af559d592f232c8ea40be7062705fa7cad8c /usr.sbin/syslogd
parent74216dceb21edf3d8580d114039d8d54c94913d2 (diff)
downloadFreeBSD-src-60f0244e876cfe471dd5223cdf47bcfbba1d767b.zip
FreeBSD-src-60f0244e876cfe471dd5223cdf47bcfbba1d767b.tar.gz
setsockopt() will return -1 on error, not 0.
Pointy hat to: Jeremie Le Hen
Diffstat (limited to 'usr.sbin/syslogd')
-rw-r--r--usr.sbin/syslogd/syslogd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 19f03cd..0d9d538 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -2568,7 +2568,7 @@ socksetup(int af, const char *bindhostname)
}
}
if (setsockopt(*s, SOL_SOCKET, SO_REUSEADDR,
- (char *)&on, sizeof (on)) < 1) {
+ (char *)&on, sizeof (on)) < 0) {
logerror("setsockopt");
close(*s);
continue;
OpenPOWER on IntegriCloud