diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-09-16 22:58:35 +0200 |
---|---|---|
committer | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-09-16 23:03:50 +0200 |
commit | 42646a8bf24be2c9280554c9d8540c67c835b3c4 (patch) | |
tree | bb7e126795f87a1d9df04519966aa85b3f3ecafa | |
parent | 1164e944d9689c3e94c100a634fb5a404662e247 (diff) |
util: remove a unnecessary check
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
-rw-r--r-- | src/shared/util.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 61d6680ddd..30b0364b64 100644 --- 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); |