Clear unwanted errno in patty_kiss_tnc_new_fd()

Clear unwanted errno in patty_kiss_tnc_new_fd() when isatty() returns
false on a file descriptor
This commit is contained in:
XANTRONIX Development 2020-08-10 01:45:53 -04:00 committed by XANTRONIX Industrial
parent 40408060de
commit 63a1c2d56e

View file

@ -147,6 +147,8 @@ patty_kiss_tnc *patty_kiss_tnc_new_fd(int fd) {
if (tcflush(fd, TCIOFLUSH) < 0) {
goto error_tcflush;
}
} else {
errno = 0;
}
tnc->fd = fd;