summaryrefslogtreecommitdiff
path: root/driver_geostar.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2016-01-29 12:37:47 -0500
committerEric S. Raymond <esr@thyrsus.com>2016-01-29 12:38:25 -0500
commitcfad4675e188afc0cb4c7841b688bda81a2f7e7e (patch)
tree70f29ee5b668fbd2c63946f5924f91990ed964d2 /driver_geostar.c
parent278a3b8c6cf5c985e0b9116c90bf598632aa8c37 (diff)
downloadgpsd-cfad4675e188afc0cb4c7841b688bda81a2f7e7e.tar.gz
Add Coverity suppressions for new invariant checks.
Diffstat (limited to 'driver_geostar.c')
-rw-r--r--driver_geostar.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/driver_geostar.c b/driver_geostar.c
index 60d80eb4..c6cb5f0d 100644
--- a/driver_geostar.c
+++ b/driver_geostar.c
@@ -546,6 +546,7 @@ static bool geostar_speed_switch(struct gps_device_t *session,
speed_t speed, char parity, int stopbits)
{
unsigned char buf[4 * 4];
+ int iparity;
switch (parity) {
case 'E':
@@ -562,11 +563,12 @@ static bool geostar_speed_switch(struct gps_device_t *session,
parity = (char)0;
break;
}
+ iparity = parity;
putbe32(buf, 0, session->driver.geostar.physical_port);
putbe32(buf, 4, speed);
putbe32(buf, 8, stopbits);
- putbe32(buf, 12, parity);
+ putbe32(buf, 12, iparity);
(void)geostar_write(session, 0x41, buf, 4);
return true; /* it would be nice to error-check this */