summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-10-09 04:07:27 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-10-09 04:07:27 -0400
commit9abaaf0defc0784226efb09b9862e1d7de407f8b (patch)
treed55d70e490a70379484c08471699db7e9b1ca2e9 /serial.c
parent4b364457ca7ffaf96bfec8e60660ef939bc6e0a7 (diff)
downloadgpsd-9abaaf0defc0784226efb09b9862e1d7de407f8b.tar.gz
splint cleanup.
Diffstat (limited to 'serial.c')
-rw-r--r--serial.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/serial.c b/serial.c
index 0c4de3e8..f3343870 100644
--- a/serial.c
+++ b/serial.c
@@ -178,13 +178,13 @@ speed_t gpsd_get_speed_old(const struct gps_device_t *dev)
return gpsd_get_speed_termios(&dev->ttyset_old);
}
-int gpsd_get_parity(const struct gps_device_t *dev)
+char gpsd_get_parity(const struct gps_device_t *dev)
{
- int parity = 0;
+ char parity = 'N';
if ((dev->ttyset.c_cflag & (PARENB | PARODD)) == (PARENB | PARODD))
- parity = 1;
+ parity = 'O';
else if ((dev->ttyset.c_cflag & PARENB) == PARENB)
- parity = 2;
+ parity = 'E';
return parity;
}