]> sigrok.org Git - libsigrok.git/commitdiff
serial: Add missing "break"s.
authorUwe Hermann <redacted>
Fri, 2 Nov 2012 14:57:21 +0000 (15:57 +0100)
committerUwe Hermann <redacted>
Fri, 2 Nov 2012 14:57:21 +0000 (15:57 +0100)
This would otherwise cause bugs when e.g. asking for 2 stopbits.

hardware/common/serial.c

index 38d4a5f121e08acaeb35da9340f095a14e1c65de..6942501c55ad8b2503ae7bd67d35776f9b197e2e 100644 (file)
@@ -293,6 +293,7 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
                break;
        case 2:
                term.c_cflag |= CSTOPB;
+               break;
        default:
                return SR_ERR;
        }
@@ -305,6 +306,7 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
                break;
        case 1:
                term.c_cflag |= CRTSCTS;
+               break;
        case 2:
                term.c_iflag |= IXON | IXOFF;
                break;