summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorF. Aragon <paco@voltanet.io>2018-09-20 16:42:31 +0200
committerF. Aragon <paco@voltanet.io>2018-09-20 16:42:31 +0200
commitb0bde9f33d4675f125919b31542c5885e70aaa96 (patch)
tree8bf3edae32c0c159e2939851ba5d69b5b6857d4b /tools
parentMerge pull request #3017 from pacovn/devbuild_Wshadow_flag (diff)
downloadfrr-b0bde9f33d4675f125919b31542c5885e70aaa96.tar.xz
frr-b0bde9f33d4675f125919b31542c5885e70aaa96.zip
tools: return check (Coverity 1399196)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/start-stop-daemon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/start-stop-daemon.c b/tools/start-stop-daemon.c
index cc0315c13..8daeda740 100644
--- a/tools/start-stop-daemon.c
+++ b/tools/start-stop-daemon.c
@@ -1030,7 +1030,9 @@ int main(int argc, char **argv)
/* change tty */
fd = open("/dev/tty", O_RDWR);
if (fd >= 0) {
- ioctl(fd, TIOCNOTTY, 0);
+ if (ioctl(fd, TIOCNOTTY, 0) < 0)
+ printf("ioctl TIOCNOTTY failed: %s\n",
+ strerror(errno));
close(fd);
}
chdir("/");