summaryrefslogtreecommitdiff
path: root/driver_navcom.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-01-22 22:44:48 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-22 22:46:20 -0500
commit78c5fe3fe60be3645e080ff14c5c843c811c82da (patch)
tree754f2bc8945acbdd288ad960d48285767ea2416b /driver_navcom.c
parent842cb2f0004842e48b064786a3e258d9cd5f9b0f (diff)
downloadgpsd-78c5fe3fe60be3645e080ff14c5c843c811c82da.tar.gz
cppcheck cleanup.
Diffstat (limited to 'driver_navcom.c')
-rw-r--r--driver_navcom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver_navcom.c b/driver_navcom.c
index 57566d7f..925b7b61 100644
--- a/driver_navcom.c
+++ b/driver_navcom.c
@@ -701,8 +701,6 @@ static gps_mask_t handle_0x81(struct gps_device_t *session)
static gps_mask_t handle_0x86(struct gps_device_t *session)
{
size_t n, i, nsu;
- uint8_t prn, ele, ca_snr, p2_snr, log_channel, hw_channel, s, stat;
- uint16_t azm, dgps_age;
unsigned char *buf = session->lexer.outbuffer + 3;
size_t msg_len = (size_t) getleu16(buf, 1);
uint16_t week = getleu16(buf, 3);
@@ -747,6 +745,8 @@ static gps_mask_t handle_0x86(struct gps_device_t *session)
/* Satellite details */
i = nsu = 0;
for (n = 17; n < msg_len; n += 14) {
+ uint8_t prn, ele, ca_snr, p2_snr, log_channel, hw_channel, s, stat;
+ uint16_t azm, dgps_age;
if (i >= MAXCHANNELS) {
gpsd_report(&session->context->errout, LOG_ERROR,
"Navcom: packet type 0x86: too many satellites!\n");