From: F. Aragon Date: Thu, 20 Sep 2018 14:42:31 +0000 (+0200) Subject: tools: return check (Coverity 1399196) X-Git-Tag: frr-7.1-dev~351^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F3060%2Fhead;p=mirror%2Ffrr.git tools: return check (Coverity 1399196) Signed-off-by: F. Aragon --- diff --git a/tools/start-stop-daemon.c b/tools/start-stop-daemon.c index cc0315c130..8daeda7402 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("/");