diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-03-02 11:50:56 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-03-02 11:50:56 +0000 |
commit | 4f9e8b2ee2bc6cd8071cefc4f51a3b41129df7b4 (patch) | |
tree | ac645421ae9e544a6666de239c5da0b1a282ab8a /serial.c | |
parent | dc9a3bae0bd6cc53bb6516c5f4eae765745b8f09 (diff) | |
download | gpsd-4f9e8b2ee2bc6cd8071cefc4f51a3b41129df7b4.tar.gz |
Defensive programming.
Diffstat (limited to 'serial.c')
-rw-r--r-- | serial.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -122,10 +122,12 @@ void gpsd_set_speed(struct gps_device_t *session, switch (parity) { case 'E': + case (char)2: session->ttyset.c_iflag |= INPCK; session->ttyset.c_cflag |= PARENB; break; case 'O': + case (char)1: session->ttyset.c_iflag |= INPCK; session->ttyset.c_cflag |= PARENB | PARODD; break; |