summaryrefslogtreecommitdiff
path: root/driver_tsip.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-25 17:24:54 -0700
committerGary E. Miller <gem@rellim.com>2018-09-25 17:29:50 -0700
commit064ae290b37e11af15442b84a0fbe507b476bd55 (patch)
tree03982fc51398d6e0f4201317b2ee83e14ca65f04 /driver_tsip.c
parent1a5c424ccbfd1c10130a34ca718108ed51a14735 (diff)
downloadgpsd-064ae290b37e11af15442b84a0fbe507b476bd55.tar.gz
driver_tsip: cppcheck found reused variable. No check caught it.
Diffstat (limited to 'driver_tsip.c')
-rw-r--r--driver_tsip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/driver_tsip.c b/driver_tsip.c
index a8994b08..8a46fe84 100644
--- a/driver_tsip.c
+++ b/driver_tsip.c
@@ -134,7 +134,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session)
uint8_t u1, u2, u3, u4, u5, u6, u7, u8, u9, u10;
int16_t s1, s2, s3, s4;
int32_t sl1, sl2, sl3;
- uint32_t ul1, ul2;
+ uint32_t ul1, ul2, ul3;
float f1, f2, f3, f4, f5;
double d1, d2, d3, d4, d5;
time_t now;
@@ -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 */
- ul1 = getbeu16(buf, 7); /* Build year */
+ ul2 = getbeu16(buf, 7); /* Build year */
u4 = getub(buf, 6); /* Build hour */
- ul2 = getbeu16(buf, 10); /* Hardware Code */
+ ul3 = 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, ul1, u4, ul2, buf2);
+ ul1, u2, u3, ul2, u4, ul3, buf2);
gpsd_log(&session->context->errout, LOG_INF,
"Hardware version: %s\n",
session->subtype);