summaryrefslogtreecommitdiff
path: root/driver_ubx.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-03-28 06:32:37 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-03-28 06:32:37 -0400
commit6b2e8ab641522c61fa520ca47b3008dc65a8aabb (patch)
treec3c5c40a50cc39c0744cde2a8c84a0cf0190ad58 /driver_ubx.c
parent5e24bd130a5456d2f5b3b1c6bb2d7222b9613180 (diff)
downloadgpsd-6b2e8ab641522c61fa520ca47b3008dc65a8aabb.tar.gz
splint cleanup. Fixes for minor but real issues...
...no attempt to address the weird cross-platfprm variability we've seen lately. All regression tests pass.
Diffstat (limited to 'driver_ubx.c')
-rw-r--r--driver_ubx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/driver_ubx.c b/driver_ubx.c
index 13eeca8c..bcb7c941 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -90,8 +90,8 @@ static void
ubx_msg_mon_ver(struct gps_device_t *session, unsigned char *buf,
size_t data_len)
{
- unsigned int n = 0; /* extended info counter */
- char obuf[128]; /* temp version string buffer */
+ size_t n = 0; /* extended info counter */
+ char obuf[128]; /* temp version string buffer */
if ( 44 > data_len ) {
/* incomplete message */
@@ -106,7 +106,7 @@ ubx_msg_mon_ver(struct gps_device_t *session, unsigned char *buf,
/* get n number of Extended info strings. what is max n? */
for ( n = 0; ; n++ ) {
- unsigned int start_of_str = UBX_MESSAGE_DATA_OFFSET + 40 + (30 * n);
+ size_t start_of_str = UBX_MESSAGE_DATA_OFFSET + 40 + (30 * n);
if ( (start_of_str + 2 ) > data_len ) {
/* last one can be shorter than 30 */
@@ -945,7 +945,7 @@ static void ubx_cfg_prt(struct gps_device_t *session,
* for example, the UBX_MON_VER fails here, but works in other
* contexts
*/
- unsigned char msg[3];
+ unsigned char msg[3] = {0, 0, 0};
/* request SW and HW Versions */
(void)ubx_write(session, UBX_CLASS_MON, 0x04, msg, 0);