summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarius <>2005-07-24 09:33:56 +0000
committermarius <>2005-07-24 09:33:56 +0000
commit16995c81478ea86d9b0d1ed0b4ca140b296d023f (patch)
tree2da4c99539e4d58da2a43ed00133af6bf54be955
parent2c2fe16031333976a7e95d7e0caf5fc7f8c32412 (diff)
downloadopenbsd-16995c81478ea86d9b0d1ed0b4ca140b296d023f.tar.gz
openbsd-16995c81478ea86d9b0d1ed0b4ca140b296d023f.tar.bz2
openbsd-16995c81478ea86d9b0d1ed0b4ca140b296d023f.zip
correct rval check for socket(). from alf schlichting. ok markus@
-rw-r--r--src/usr.bin/nc/netcat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c
index a8b4ac3839..c298ade67f 100644
--- a/src/usr.bin/nc/netcat.c
+++ b/src/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: netcat.c,v 1.81 2005/05/28 16:57:48 marius Exp $ */ 1/* $OpenBSD: netcat.c,v 1.82 2005/07/24 09:33:56 marius Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> 3 * Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
4 * 4 *
@@ -544,7 +544,7 @@ local_listen(char *host, char *port, struct addrinfo hints)
544 res0 = res; 544 res0 = res;
545 do { 545 do {
546 if ((s = socket(res0->ai_family, res0->ai_socktype, 546 if ((s = socket(res0->ai_family, res0->ai_socktype,
547 res0->ai_protocol)) == 0) 547 res0->ai_protocol)) < 0)
548 continue; 548 continue;
549 549
550 ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); 550 ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x));