chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
terminal-util: remove unnecessary check of result of isatty() (#4000)
[elogind.git]
/
src
/
basic
/
terminal-util.c
diff --git
a/src/basic/terminal-util.c
b/src/basic/terminal-util.c
index 215b764882b95dbde54dc09b599b0a948776de1f..efd35cd727cc944c166f428c113669ff97d975c6 100644
(file)
--- a/
src/basic/terminal-util.c
+++ b/
src/basic/terminal-util.c
@@
-347,12
+347,7
@@
int open_terminal(const char *name, int mode) {
}
r = isatty(fd);
}
r = isatty(fd);
- if (r < 0) {
- safe_close(fd);
- return -errno;
- }
-
- if (!r) {
+ if (r == 0) {
safe_close(fd);
return -ENOTTY;
}
safe_close(fd);
return -ENOTTY;
}