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 /driver_geostar.c | |
parent | 61ab6a6636762115689a190b4a9fe3386008d24c (diff) | |
download | gpsd-ddc22ff56acef0690abfd22ee640cda4eb143933.tar.gz |
Cleanup motivated by new cppcheck with more tests. All regression tests pass.
Diffstat (limited to 'driver_geostar.c')
-rw-r--r-- | driver_geostar.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/driver_geostar.c b/driver_geostar.c index c15a5c06..12660194 100644 --- a/driver_geostar.c +++ b/driver_geostar.c @@ -84,7 +84,6 @@ static int geostar_write(struct gps_device_t *session, static bool geostar_detect(struct gps_device_t *session) { unsigned char buf[1 * 4]; - unsigned int n; bool ret = false; int myfd; fd_set fdset; @@ -97,6 +96,7 @@ static bool geostar_detect(struct gps_device_t *session) putbe32(buf, 0, 0); /*@+shiftimplementation +ignoresigns@*/ if (geostar_write(session, 0xc1, buf, 1) == 0) { + unsigned int n; for (n = 0; n < 3; n++) { FD_ZERO(&fdset); FD_SET(myfd, &fdset); @@ -437,9 +437,8 @@ static gps_mask_t geostar_analyze(struct gps_device_t *session) static gps_mask_t geostar_parse_input(struct gps_device_t *session) { - gps_mask_t st; - if (session->packet.type == GEOSTAR_PACKET) { + gps_mask_t st; st = geostar_analyze(session); session->gpsdata.dev.driver_mode = MODE_BINARY; return st; |