diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-11-05 20:21:42 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-05 20:21:42 -0500 |
commit | 032607920d8d6f335e3bfbca1fc76e9d77dc7457 (patch) | |
tree | 632e28102497e16d43be91ca0dbcec5a7ed5041c /libgps_sock.c | |
parent | 6a0157a94666ae5a653bc297aedc1f6c8f1eaf3a (diff) | |
download | gpsd-032607920d8d6f335e3bfbca1fc76e9d77dc7457.tar.gz |
Full splint cleanup. Partial cppcheck cleanup.
Diffstat (limited to 'libgps_sock.c')
-rw-r--r-- | libgps_sock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgps_sock.c b/libgps_sock.c index bdbecdea..a8361077 100644 --- a/libgps_sock.c +++ b/libgps_sock.c @@ -267,9 +267,9 @@ int gps_unpack(char *buf, struct gps_data_t *gpsdata) for (ns = buf; ns; ns = strstr(ns + 1, "GPSD")) { if ( /*@i1@*/ strncmp(ns, "GPSD", 4) == 0) { - bool eol = false; /* the following should execute each time we have a good next sp */ for (sp = ns + 5; *sp != '\0'; sp = tp + 1) { + bool eol = false; tp = sp + strcspn(sp, ",\r\n"); eol = *tp == '\r' || *tp == '\n'; if (*tp == '\0') |