diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/w/w.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 96b0a2b..b02ff5a7 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 && strcmp(p, "-") && inet_addr(p) == INADDR_NONE) { + if (nflag && *p && strcmp(p, "-") && inet_addr(p) == INADDR_NONE) { hp = gethostbyname(p); if (hp != NULL) { |