Added missing break statements in the serial_flush() functions.

This commit is contained in:
Jef Driesen 2007-10-29 10:54:40 +00:00
parent 76e5f12094
commit c5fc289cb2
2 changed files with 6 additions and 0 deletions

View File

@ -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) {

View File

@ -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)) {