diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2003-08-15 21:58:14 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2003-08-15 21:58:14 +0000 |
| commit | fe0bbc0a57621e18c2926a55f3385fb64ffe0a6e (patch) | |
| tree | efdc031876d7fd29098293d85b6a30f19849da78 /usr.bin | |
| parent | 07e8438c71295da9f1f094677072bb1434e634df (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -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 5502c394ead1..a9107df1ccd6 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -505,11 +505,10 @@ ttystat(line, 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 |
