|
|
@@ -1367,7 +1367,7 @@ int get_serial_cts(int fd)
|
|
|
{
|
|
|
int flags;
|
|
|
|
|
|
- if (!fd)
|
|
|
+ if (fd == -1)
|
|
|
return -1;
|
|
|
|
|
|
ioctl(fd, TIOCMGET, &flags);
|
|
|
@@ -1378,7 +1378,7 @@ int set_serial_rts(int fd, int rts)
|
|
|
{
|
|
|
int flags;
|
|
|
|
|
|
- if (!fd)
|
|
|
+ if (fd == -1)
|
|
|
return -1;
|
|
|
|
|
|
ioctl(fd, TIOCMGET, &flags);
|
|
|
@@ -1394,7 +1394,7 @@ int set_serial_rts(int fd, int rts)
|
|
|
#else
|
|
|
int get_serial_cts(const int fd)
|
|
|
{
|
|
|
- if (!fd)
|
|
|
+ if (fd == -1)
|
|
|
return -1;
|
|
|
const HANDLE fh = (HANDLE)_get_osfhandle(fd);
|
|
|
if (!fh)
|