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:
parent
1164e944d9
commit
42646a8bf2
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue