summaryrefslogtreecommitdiff
path: root/driver_tsip.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-04-30 23:04:53 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-04-30 23:05:37 -0400
commit321c7710c3f3a17d56e9e5eede9aebadbaf16e3e (patch)
treefae8712111ede1cd948e8846a3bbdafeb8dfd45a /driver_tsip.c
parent5aa7ce8d00de15c832ab90113ef5b08221746e7f (diff)
downloadgpsd-321c7710c3f3a17d56e9e5eede9aebadbaf16e3e.tar.gz
Fix static-checker warnings. All regression tests pass.
cppchecker now finds variables that could have reduced scope; that's most of these.
Diffstat (limited to 'driver_tsip.c')
-rw-r--r--driver_tsip.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/driver_tsip.c b/driver_tsip.c
index 3c99138a..ea4250bb 100644
--- a/driver_tsip.c
+++ b/driver_tsip.c
@@ -1067,11 +1067,10 @@ static bool tsip_speed_switch(struct gps_device_t *session,
static void tsip_mode(struct gps_device_t *session, int mode)
{
- unsigned char buf[16];
-
if (mode == MODE_NMEA) {
- /* First turn on the NMEA messages we want */
+ unsigned char buf[16];
+ /* First turn on the NMEA messages we want */
putbyte(buf, 0, 0x00); /* subcode 0 */
putbyte(buf, 1, 0x01); /* 1-second fix interval */
putbyte(buf, 2, 0x00); /* Reserved */