tools: return check (Coverity 1399196)

Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
F. Aragon 2018-09-20 16:42:31 +02:00
parent dc790ba83d
commit b0bde9f33d
No known key found for this signature in database
GPG Key ID: FD112A8C7E6A5E4A

View 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("/");