summaryrefslogtreecommitdiffstats
path: root/usr.bin/w/w.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/w/w.c')
-rw-r--r--usr.bin/w/w.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index 06c9d72..96b0a2b 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -323,7 +323,7 @@ main(argc, argv)
}
p = hp->h_name;
}
- if (nflag && inet_addr(p) == INADDR_NONE) {
+ if (nflag && strcmp(p, "-") && inet_addr(p) == INADDR_NONE) {
hp = gethostbyname(p);
if (hp != NULL) {
OpenPOWER on IntegriCloud