summaryrefslogtreecommitdiff
path: root/driver_oncore.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-06 08:06:51 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-06 08:07:42 -0500
commitd93ba6e008cb6a7f75adf3d4c08876cf96fe95b0 (patch)
treedad294889820f98f7d7a9e50e0f9baac12796977 /driver_oncore.c
parentf597416e78989e83b67608a4fb0542e2b33554d5 (diff)
downloadgpsd-d93ba6e008cb6a7f75adf3d4c08876cf96fe95b0.tar.gz
More cppcheck cleanup. All regression tests pass. PPS is live.
Diffstat (limited to 'driver_oncore.c')
-rw-r--r--driver_oncore.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/driver_oncore.c b/driver_oncore.c
index a0b208d6..14e2f6d5 100644
--- a/driver_oncore.c
+++ b/driver_oncore.c
@@ -273,8 +273,6 @@ oncore_msg_svinfo(struct gps_device_t *session, unsigned char *buf,
size_t data_len)
{
unsigned int i, nchan;
- unsigned int off;
- int sv, el, az;
int j;
if (data_len != 92)
@@ -289,11 +287,11 @@ oncore_msg_svinfo(struct gps_device_t *session, unsigned char *buf,
session->driver.oncore.visible = (int)nchan;
for (i = 0; i < nchan; i++) {
/* get info for one channel/satellite */
- off = 5 + 7 * i;
+ unsigned int off = 5 + 7 * i;
- sv = (int)getub(buf, off);
- el = (int)getub(buf, off + 3);
- az = (int)getbeu16(buf, off + 4);
+ int sv = (int)getub(buf, off);
+ int el = (int)getub(buf, off + 3);
+ int az = (int)getbeu16(buf, off + 4);
gpsd_report(session->context->debug, LOG_IO, "%2d %2d %2d %3d\n", i, sv, el, az);