summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>1999-12-20 09:43:02 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>1999-12-20 09:43:02 +0000
commit48e026bd9c1e1bac67b9c636af100fde38837f53 (patch)
treeaed4efa369ec799d3b367d0e8c99d11fd1e0a9e6 /usr.bin
parent48c03f2afa282288704b622857f12ad59d5cc4f1 (diff)
it looks perror("") has no effect in most cases.
use strerror(errno) and format it on our own.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/telnet/commands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c
index 343eb46afe8..0cd89fb54ce 100644
--- a/usr.bin/telnet/commands.c
+++ b/usr.bin/telnet/commands.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: commands.c,v 1.24 1999/12/11 22:12:00 angelos Exp $ */
+/* $OpenBSD: commands.c,v 1.25 1999/12/20 09:43:01 itojun Exp $ */
/* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */
/*
@@ -2481,8 +2481,8 @@ tn(argc, argv)
getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf),
NULL, 0, NI_NUMERICHOST);
- fprintf(stderr, "telnet: connect to address %s: ", hbuf);
- perror("");
+ fprintf(stderr, "telnet: connect to address %s: %s\n", hbuf,
+ strerror(errno));
close(net);
net = -1;