From 032607920d8d6f335e3bfbca1fc76e9d77dc7457 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 5 Nov 2013 20:21:42 -0500 Subject: Full splint cleanup. Partial cppcheck cleanup. --- libgps_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgps_sock.c') 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') -- cgit v1.2.1