diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-04-30 23:04:53 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-04-30 23:05:37 -0400 |
commit | 321c7710c3f3a17d56e9e5eede9aebadbaf16e3e (patch) | |
tree | fae8712111ede1cd948e8846a3bbdafeb8dfd45a /timebase.c | |
parent | 5aa7ce8d00de15c832ab90113ef5b08221746e7f (diff) | |
download | gpsd-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 'timebase.c')
-rw-r--r-- | timebase.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -135,11 +135,10 @@ void gpsd_set_century(struct gps_device_t *session) * started up in. */ { - unsigned char *cp; char *end; if (strstr((char *)session->packet.outbuffer, "Date:") != NULL) { int year; - cp = session->packet.outbuffer + 5; + unsigned char *cp = session->packet.outbuffer + 5; while (isspace(*cp)) --cp; year = (int)strtol((char *)cp, &end, 10); |