Merge pull request #3060 from pacovn/Coverity_1399196_Unchecked_return_value

tools: return check (Coverity 1399196)
This commit is contained in:
Donald Sharp 2018-09-20 13:12:06 -04:00 committed by GitHub
commit a05cee9a1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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