setsockopt() will return -1 on error, not 0.

Pointy hat to:	Jeremie Le Hen
This commit is contained in:
Olivier Houchard 2005-09-28 16:14:43 +00:00
parent 20c0b2d3c3
commit c825862e6c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=150690

View File

@ -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;