diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2012-05-16 20:42:26 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2012-05-16 20:42:26 -0400 |
commit | ddc22ff56acef0690abfd22ee640cda4eb143933 (patch) | |
tree | bcbccbbab554a3e2915abfad9b5fe91a6604ff08 /drivers.c | |
parent | 61ab6a6636762115689a190b4a9fe3386008d24c (diff) | |
download | gpsd-ddc22ff56acef0690abfd22ee640cda4eb143933.tar.gz |
Cleanup motivated by new cppcheck with more tests. All regression tests pass.
Diffstat (limited to 'drivers.c')
-rw-r--r-- | drivers.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1078,7 +1078,6 @@ static gps_mask_t processMTK3301(struct gps_device_t *session) { const char *mtk_reasons[4] = { "Invalid", "Unsupported", "Valid but Failed", "Valid success" }; - int msg, reason; gps_mask_t mask; /* try a straight NMEA parse, this will set up fields */ @@ -1087,6 +1086,8 @@ static gps_mask_t processMTK3301(struct gps_device_t *session) if (session->packet.type == NMEA_PACKET && strncmp(session->driver.nmea.field[0], "PMTK", 4) == 0) { + int msg, reason; + msg = atoi(&(session->driver.nmea.field[0])[4]); switch (msg) { case 705: /* */ |