chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1164e94
)
util: remove a unnecessary check
author
Thomas Hindoe Paaboel Andersen
<phomes@gmail.com>
Tue, 16 Sep 2014 20:58:35 +0000
(22:58 +0200)
committer
Thomas Hindoe Paaboel Andersen
<phomes@gmail.com>
Tue, 16 Sep 2014 21:03:50 +0000
(23:03 +0200)
We only break out of the previous loop if fd >= 0 so there is no
use in checking it again.
Found by coverity. Fixes: CID#
1237577
src/shared/util.c
patch
|
blob
|
history
diff --git
a/src/shared/util.c
b/src/shared/util.c
index 61d6680dddfb5c5dabbe9a45b38b7ebe658f9ee6..30b0364b64cb7e0edf3d7803a7322ac0d758fdb7 100644
(file)
--- a/
src/shared/util.c
+++ b/
src/shared/util.c
@@
-1878,9
+1878,6
@@
int open_terminal(const char *name, int mode) {
c++;
}
- if (fd < 0)
- return -errno;
-
r = isatty(fd);
if (r < 0) {
safe_close(fd);