]> git.puffer.fish Git - mirror/frr.git/commitdiff
tools: return check (Coverity 1399196) 3060/head
authorF. Aragon <paco@voltanet.io>
Thu, 20 Sep 2018 14:42:31 +0000 (16:42 +0200)
committerF. Aragon <paco@voltanet.io>
Thu, 20 Sep 2018 14:42:31 +0000 (16:42 +0200)
Signed-off-by: F. Aragon <paco@voltanet.io>
tools/start-stop-daemon.c

index cc0315c1307de1c0166af7821c752bd56388f8eb..8daeda7402a1b98cd7285b13cf554ee921540486 100644 (file)
@@ -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("/");