wall: remove unnecessary warning

wall(1) may be used in scripts or in pipe. In this case report failed
ttyname() does not make sense, especially if the code does not depend
on on this function.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1608176
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2019-02-14 10:41:59 +01:00
parent f920f73d83
commit 3de236340d
1 changed files with 0 additions and 1 deletions

View File

@ -359,7 +359,6 @@ static char *makemsg(char *fname, char **mvec, int mvecsz,
where = ttyname(STDOUT_FILENO);
if (!where) {
where = "somewhere";
warn(_("cannot get tty name"));
} else if (strncmp(where, "/dev/", 5) == 0)
where += 5;