diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-07-11 15:42:14 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-07-11 23:20:31 +0200 |
commit | 66855de739dad2ca4fc24f353637fb2757e542ae (patch) | |
tree | 40a743abe8ec511b21a07cc4158d8da21af43746 /src/getty-generator | |
parent | errno-util: add new errno_or_else() helper (diff) | |
download | systemd-66855de739dad2ca4fc24f353637fb2757e542ae.tar.xz systemd-66855de739dad2ca4fc24f353637fb2757e542ae.zip |
tree-wide: make use of errno_or_else() everywhere
Diffstat (limited to 'src/getty-generator')
-rw-r--r-- | src/getty-generator/getty-generator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index 8610ab6705..4563daf3ad 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -6,6 +6,7 @@ #include <unistd.h> #include "alloc-util.h" +#include "errno-util.h" #include "fd-util.h" #include "fileio.h" #include "generator.h" @@ -94,7 +95,7 @@ static int verify_tty(const char *name) { errno = 0; if (isatty(fd) <= 0) - return errno > 0 ? -errno : -EIO; + return errno_or_else(EIO); return 0; } |