summaryrefslogtreecommitdiff
path: root/driver_tsip.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-25 16:40:51 -0700
committerGary E. Miller <gem@rellim.com>2018-09-25 16:40:51 -0700
commit16e2664bd6e6d9f56dac11e32022db5ced2e41f3 (patch)
treeb7cfbfc7c22ff044274bab3ea026b934b64eb842 /driver_tsip.c
parentbed016316c9669a03891c326064f4ca494f84dba (diff)
downloadgpsd-16e2664bd6e6d9f56dac11e32022db5ced2e41f3.tar.gz
driver_tsip: fix cppcheck nits.
Diffstat (limited to 'driver_tsip.c')
-rw-r--r--driver_tsip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/driver_tsip.c b/driver_tsip.c
index 829bbbe3..a8994b08 100644
--- a/driver_tsip.c
+++ b/driver_tsip.c
@@ -202,7 +202,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session)
u4 = getub(buf, 4); /* Build number */
u5 = getub(buf, 5); /* Month */
u6 = getub(buf, 6); /* Day */
- s1 = (int16_t)getbeu16(buf, 7); /* Year */
+ ul1 = getbeu16(buf, 7); /* Year */
u7 = getub(buf, 9); /* Length of first module name */
for (i=0; i < (int)u7; i++) {
buf2[i] = (char)getub(buf, 10+i); /* Product name in ASCII */
@@ -211,7 +211,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session)
(void)snprintf(session->subtype, sizeof(session->subtype),
"sw %u %u %u %02u.%02u.%04u %.62s",
- u2, u3, u4, u6, u5, s1, buf2);
+ u2, u3, u4, u6, u5, ul1, buf2);
gpsd_log(&session->context->errout, LOG_INF,
"Software version: %s\n",
session->subtype);
@@ -222,9 +222,9 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session)
ul1 = getbeu32(buf, 1); /* Serial number */
u2 = getub(buf, 5); /* Build day */
u3 = getub(buf, 6); /* Build month */
- s1 = (int16_t)getbeu16(buf, 7); /* Build year */
+ ul1 = getbeu16(buf, 7); /* Build year */
u4 = getub(buf, 6); /* Build hour */
- s2 = (int16_t)getbeu16(buf, 10); /* Hardware Code */
+ ul2 = getbeu16(buf, 10); /* Hardware Code */
u5 = getub(buf, 12); /* Length of Hardware ID */
/* coverity_submit[tainted_data] */
for (i=0; i < (int)u5; i++) {
@@ -234,7 +234,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session)
(void)snprintf(session->subtype, sizeof(session->subtype),
"hw %u %02u.%02u.%04u %02u %u %.48s",
- ul1, u2, u3, s1, u4, s2, buf2);
+ ul1, u2, u3, ul1, u4, ul2, buf2);
gpsd_log(&session->context->errout, LOG_INF,
"Hardware version: %s\n",
session->subtype);