]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
wall: remove unnecessary warning
authorKarel Zak <kzak@redhat.com>
Thu, 14 Feb 2019 09:41:59 +0000 (10:41 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 2 Apr 2019 10:57:51 +0000 (12:57 +0200)
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>
term-utils/wall.c

index 48e654ac662d3984f08e6b7274f15d680ba33659..4c49ebaa1bab0913512f2de1dc56623381f14d11 100644 (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;