Added missing break statements in the serial_flush() functions.
This commit is contained in:
parent
76e5f12094
commit
c5fc289cb2
@ -511,10 +511,13 @@ serial_flush (serial *device, int queue)
|
||||
switch (queue) {
|
||||
case SERIAL_QUEUE_INPUT:
|
||||
flags = TCIFLUSH;
|
||||
break;
|
||||
case SERIAL_QUEUE_OUTPUT:
|
||||
flags = TCOFLUSH;
|
||||
break;
|
||||
default:
|
||||
flags = TCIOFLUSH;
|
||||
break;
|
||||
}
|
||||
|
||||
if (tcflush (device->fd, flags) != 0) {
|
||||
|
||||
@ -355,10 +355,13 @@ serial_flush (serial* device, int queue)
|
||||
switch (queue) {
|
||||
case SERIAL_QUEUE_INPUT:
|
||||
flags = PURGE_RXABORT | PURGE_RXCLEAR;
|
||||
break;
|
||||
case SERIAL_QUEUE_OUTPUT:
|
||||
flags = PURGE_TXABORT | PURGE_TXCLEAR;
|
||||
break;
|
||||
default:
|
||||
flags = PURGE_RXABORT | PURGE_RXCLEAR | PURGE_TXABORT | PURGE_TXCLEAR;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!PurgeComm (device->hFile, flags)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user