summaryrefslogtreecommitdiff
path: root/usr.bin/nc/netcat.c
diff options
context:
space:
mode:
authorKevin Steves <stevesk@cvs.openbsd.org>2002-12-30 17:57:59 +0000
committerKevin Steves <stevesk@cvs.openbsd.org>2002-12-30 17:57:59 +0000
commitb6dd7db59a70efda47ea9cdc7a9c5f37975bebaf (patch)
tree23e1d81e969fdb4783634428f5717d1b0408e0e9 /usr.bin/nc/netcat.c
parentd71790a436158bd3c498e32d8adb6b19b62b08a9 (diff)
include function in error; from Owl. ok fgsch@
Diffstat (limited to 'usr.bin/nc/netcat.c')
-rw-r--r--usr.bin/nc/netcat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index 8361d228ff4..cdcc0b22730 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.55 2002/12/28 10:24:09 fgsch Exp $ */
+/* $OpenBSD: netcat.c,v 1.56 2002/12/30 17:57:58 stevesk Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@@ -426,7 +426,7 @@ remote_connect(char *host, char *port, struct addrinfo hints)
int s, error;
if ((error = getaddrinfo(host, port, &hints, &res)))
- errx(1, "%s", gai_strerror(error));
+ errx(1, "getaddrinfo: %s", gai_strerror(error));
res0 = res;
do {
@@ -451,7 +451,7 @@ remote_connect(char *host, char *port, struct addrinfo hints)
ahints.ai_protocol = uflag ? IPPROTO_UDP : IPPROTO_TCP;
ahints.ai_flags = AI_PASSIVE;
if ((error = getaddrinfo(sflag, pflag, &ahints, &ares)))
- errx(1, "%s", gai_strerror(error));
+ errx(1, "getaddrinfo: %s", gai_strerror(error));
if (bind(s, (struct sockaddr *)ares->ai_addr,
ares->ai_addrlen) < 0) {
@@ -497,7 +497,7 @@ local_listen(char *host, char *port, struct addrinfo hints)
hints.ai_family = AF_INET;
if ((error = getaddrinfo(host, port, &hints, &res)))
- errx(1, "%s", gai_strerror(error));
+ errx(1, "getaddrinfo: %s", gai_strerror(error));
res0 = res;
do {