diff options
Diffstat (limited to 'usr.bin/w/w.c')
-rw-r--r-- | usr.bin/w/w.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index e93630f..7d3907b 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -491,11 +491,10 @@ ttystat(char *line, int sz) char ttybuf[MAXPATHLEN]; (void)snprintf(ttybuf, sizeof(ttybuf), "%s%.*s", _PATH_DEV, sz, line); - if (stat(ttybuf, &sb)) { - warn("%s", ttybuf); + if (stat(ttybuf, &sb) == 0) { + return (&sb); + } else return (NULL); - } - return (&sb); } static void |