summaryrefslogtreecommitdiff
path: root/driver_oncore.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-05 20:21:42 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-05 20:21:42 -0500
commit032607920d8d6f335e3bfbca1fc76e9d77dc7457 (patch)
tree632e28102497e16d43be91ca0dbcec5a7ed5041c /driver_oncore.c
parent6a0157a94666ae5a653bc297aedc1f6c8f1eaf3a (diff)
downloadgpsd-032607920d8d6f335e3bfbca1fc76e9d77dc7457.tar.gz
Full splint cleanup. Partial cppcheck cleanup.
Diffstat (limited to 'driver_oncore.c')
-rw-r--r--driver_oncore.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/driver_oncore.c b/driver_oncore.c
index 45929451..a0b208d6 100644
--- a/driver_oncore.c
+++ b/driver_oncore.c
@@ -67,10 +67,9 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf,
unsigned char flags;
double lat, lon, alt;
float speed, track, dop;
- unsigned int i, j, st, nsv, off;
+ unsigned int i, j, st, nsv;
int Bbused;
struct tm unpacked_date;
- unsigned int nsec;
if (data_len != 76)
return 0;
@@ -99,6 +98,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf,
* and not UTC time. Do not use it.
*/
if (session->context->leap_seconds) {
+ unsigned int nsec;
unpacked_date.tm_mon = (int)getub(buf, 4) - 1;
unpacked_date.tm_mday = (int)getub(buf, 5);
unpacked_date.tm_year = (int)getbeu16(buf, 6) - 1900;
@@ -150,6 +150,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf,
nsv = 0;
for (i = st = 0; i < 8; i++) {
int sv, mode, sn, status;
+ unsigned int off;
off = 40 + 4 * i;
sv = (int)getub(buf, off);