diff options
author | stevesk <> | 2002-12-30 17:57:58 +0000 |
---|---|---|
committer | stevesk <> | 2002-12-30 17:57:58 +0000 |
commit | 09c39c7deeff642460999d9ed8281114659310a7 (patch) | |
tree | 255619f47761f2152f118644958d74e3c924bfbb | |
parent | 76edae38ccbe0391859c98311e8888a40af478f6 (diff) | |
download | openbsd-09c39c7deeff642460999d9ed8281114659310a7.tar.gz openbsd-09c39c7deeff642460999d9ed8281114659310a7.tar.bz2 openbsd-09c39c7deeff642460999d9ed8281114659310a7.zip |
include function in error; from Owl. ok fgsch@
-rw-r--r-- | src/usr.bin/nc/netcat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c index 8361d228ff..cdcc0b2273 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.55 2002/12/28 10:24:09 fgsch Exp $ */ | 1 | /* $OpenBSD: netcat.c,v 1.56 2002/12/30 17:57:58 stevesk Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> | 3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> |
4 | * | 4 | * |
@@ -426,7 +426,7 @@ remote_connect(char *host, char *port, struct addrinfo hints) | |||
426 | int s, error; | 426 | int s, error; |
427 | 427 | ||
428 | if ((error = getaddrinfo(host, port, &hints, &res))) | 428 | if ((error = getaddrinfo(host, port, &hints, &res))) |
429 | errx(1, "%s", gai_strerror(error)); | 429 | errx(1, "getaddrinfo: %s", gai_strerror(error)); |
430 | 430 | ||
431 | res0 = res; | 431 | res0 = res; |
432 | do { | 432 | do { |
@@ -451,7 +451,7 @@ remote_connect(char *host, char *port, struct addrinfo hints) | |||
451 | ahints.ai_protocol = uflag ? IPPROTO_UDP : IPPROTO_TCP; | 451 | ahints.ai_protocol = uflag ? IPPROTO_UDP : IPPROTO_TCP; |
452 | ahints.ai_flags = AI_PASSIVE; | 452 | ahints.ai_flags = AI_PASSIVE; |
453 | if ((error = getaddrinfo(sflag, pflag, &ahints, &ares))) | 453 | if ((error = getaddrinfo(sflag, pflag, &ahints, &ares))) |
454 | errx(1, "%s", gai_strerror(error)); | 454 | errx(1, "getaddrinfo: %s", gai_strerror(error)); |
455 | 455 | ||
456 | if (bind(s, (struct sockaddr *)ares->ai_addr, | 456 | if (bind(s, (struct sockaddr *)ares->ai_addr, |
457 | ares->ai_addrlen) < 0) { | 457 | ares->ai_addrlen) < 0) { |
@@ -497,7 +497,7 @@ local_listen(char *host, char *port, struct addrinfo hints) | |||
497 | hints.ai_family = AF_INET; | 497 | hints.ai_family = AF_INET; |
498 | 498 | ||
499 | if ((error = getaddrinfo(host, port, &hints, &res))) | 499 | if ((error = getaddrinfo(host, port, &hints, &res))) |
500 | errx(1, "%s", gai_strerror(error)); | 500 | errx(1, "getaddrinfo: %s", gai_strerror(error)); |
501 | 501 | ||
502 | res0 = res; | 502 | res0 = res; |
503 | do { | 503 | do { |