systemd/0002-util-remove-a-unnecessary-check.patch

26 lines
738 B
Diff

Based on 42646a8bf24be2c9280554c9d8540c67c835b3c4 Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Date: Tue, 16 Sep 2014 22:58:35 +0200
Subject: [PATCH] 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
---
src/shared/util.c | 3 ---
1 file changed, 3 deletions(-)
--- src/shared/util.c
+++ src/shared/util.c 2014-09-18 13:05:08.218236754 +0000
@@ -1772,9 +1772,6 @@ int open_terminal(const char *name, int
c++;
}
- if (fd < 0)
- return -errno;
-
r = isatty(fd);
if (r < 0) {
close_nointr_nofail(fd);