diff --git a/src/kits/device/SerialPort.cpp b/src/kits/device/SerialPort.cpp index 6cb74dda37..b116d1cf3b 100644 --- a/src/kits/device/SerialPort.cpp +++ b/src/kits/device/SerialPort.cpp @@ -105,7 +105,7 @@ BSerialPort::Open(const char *portName) // A name like "/dev/ports/serial2" was passed snprintf(buf, 64, "%s", portName); - if (ffd > 0) //If this port is already open, close it + if (ffd >= 0) //If this port is already open, close it close(ffd); // TODO: BeOS don't use O_EXCL, and this seems to lead