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
This commit is contained in:
Thomas Hindoe Paaboel Andersen 2014-09-16 22:58:35 +02:00
parent 1164e944d9
commit 42646a8bf2

View file

@ -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);