[systemd-commits] src/shared
Thomas H.P. Andersen
phomes at kemper.freedesktop.org
Tue Sep 16 14:04:00 PDT 2014
src/shared/util.c | 3 ---
1 file changed, 3 deletions(-)
New commits:
commit 42646a8bf24be2c9280554c9d8540c67c835b3c4
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Tue Sep 16 22:58:35 2014 +0200
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
diff --git a/src/shared/util.c b/src/shared/util.c
index 61d6680..30b0364 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);
More information about the systemd-commits
mailing list