summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2010-07-03 03:38:22 +0000
committernicm <nicm@openbsd.org>2010-07-03 03:38:22 +0000
commitdd78e3bf42d421321a753b74205cc896ae2667e0 (patch)
tree23707aa1dfb6a19496a1388689200c78dba990ef
parentreplace 0 with equivalent allocation flag. ok thib (diff)
downloadwireguard-openbsd-dd78e3bf42d421321a753b74205cc896ae2667e0.tar.xz
wireguard-openbsd-dd78e3bf42d421321a753b74205cc896ae2667e0.zip
When open() fails, warn using the device name, not the host name.
-rw-r--r--usr.bin/tip/hunt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tip/hunt.c b/usr.bin/tip/hunt.c
index 92170e33bfa..a7ec77b787f 100644
--- a/usr.bin/tip/hunt.c
+++ b/usr.bin/tip/hunt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hunt.c,v 1.18 2010/07/02 05:52:48 nicm Exp $ */
+/* $OpenBSD: hunt.c,v 1.19 2010/07/03 03:38:22 nicm Exp $ */
/* $NetBSD: hunt.c,v 1.6 1997/04/20 00:02:10 mellon Exp $ */
/*
@@ -89,7 +89,7 @@ hunt(char *hosts)
fd = open(device,
O_RDWR | (vgetnum(DC) ? O_NONBLOCK : 0));
if (fd < 0)
- perror(host);
+ perror(device);
}
alarm(0);