From: Zbigniew Jędrzejewski-Szmek Date: Wed, 9 Jan 2019 13:08:29 +0000 (+0100) Subject: logind: do not pass negative number to strerror X-Git-Tag: v241-rc1~97 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=commitdiff_plain;h=65641b3cdc12923320879bac6f071eb45a70e79c logind: do not pass negative number to strerror --- diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index c758ffd5fad..a6d88f8e7b8 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -376,7 +376,7 @@ int seat_read_active_vt(Seat *s) { k = read(s->manager->console_active_fd, t, sizeof(t)-1); if (k <= 0) { - log_error("Failed to read current console: %s", k < 0 ? strerror(-errno) : "EOF"); + log_error("Failed to read current console: %s", k < 0 ? strerror(errno) : "EOF"); return k < 0 ? -errno : -EIO; }