diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2012-05-16 20:08:41 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2012-05-16 20:08:41 -0400 |
commit | e8ad2a489d193b81b9fbfa0525e4d607859f6b0d (patch) | |
tree | d52b0693705628195086e7ed0656d64147608cb8 /contrib/ashctl.c | |
parent | acb1d33db991147d689857ca388ab20a0867050c (diff) | |
download | gpsd-e8ad2a489d193b81b9fbfa0525e4d607859f6b0d.tar.gz |
New version of cppcheck requires more suppressions.
Diffstat (limited to 'contrib/ashctl.c')
-rw-r--r-- | contrib/ashctl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/ashctl.c b/contrib/ashctl.c index 0475255a..fdf04bfd 100644 --- a/contrib/ashctl.c +++ b/contrib/ashctl.c @@ -135,10 +135,12 @@ static void config_raw(int fd){ static void nmea_add_checksum(char *sentence) /* add NMEA checksum to a possibly *-terminated sentence */ { - unsigned char sum = '\0'; - char c, *p = sentence; + char *p = sentence; if (*p == '$') { + unsigned char sum = '\0'; + char c; + p++; while ( ((c = *p) != '*') && (c != '\0')) { sum ^= c; |