summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/usr.bin/nc/netcat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c
index d30dd938f3..3af7d50374 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.162 2016/08/13 13:09:10 jsing Exp $ */ 1/* $OpenBSD: netcat.c,v 1.163 2016/09/03 17:35:34 bcook Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> 3 * Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
4 * Copyright (c) 2015 Bob Beck. All rights reserved. 4 * Copyright (c) 2015 Bob Beck. All rights reserved.
@@ -825,7 +825,7 @@ int
825remote_connect(const char *host, const char *port, struct addrinfo hints) 825remote_connect(const char *host, const char *port, struct addrinfo hints)
826{ 826{
827 struct addrinfo *res, *res0; 827 struct addrinfo *res, *res0;
828 int s, error, on = 1, save_errno; 828 int s = -1, error, on = 1, save_errno;
829 829
830 if ((error = getaddrinfo(host, port, &hints, &res0))) 830 if ((error = getaddrinfo(host, port, &hints, &res0)))
831 errx(1, "getaddrinfo: %s", gai_strerror(error)); 831 errx(1, "getaddrinfo: %s", gai_strerror(error));
@@ -911,7 +911,7 @@ int
911local_listen(char *host, char *port, struct addrinfo hints) 911local_listen(char *host, char *port, struct addrinfo hints)
912{ 912{
913 struct addrinfo *res, *res0; 913 struct addrinfo *res, *res0;
914 int s, ret, x = 1, save_errno; 914 int s = -1, ret, x = 1, save_errno;
915 int error; 915 int error;
916 916
917 /* Allow nodename to be null. */ 917 /* Allow nodename to be null. */