pud: nmealib: fix a Coverity warning
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 25 Feb 2015 20:16:31 +0000 (21:16 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 25 Feb 2015 20:47:56 +0000 (21:47 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/nmealib/src/tok.c

index 931c4bf..261c232 100644 (file)
@@ -172,7 +172,7 @@ int nmea_scanf(const char *s, int len, const char *format, ...) {
                        if (isdigit(*format))
                                break;
                        {
-                               tok_type = NMEA_TOKS_TYPE;
+                               /* No need to do 'tok_type = NMEA_TOKS_TYPE' since we'll do a fall-through */
                                if (format > beg_fmt)
                                        width = nmea_atoi(beg_fmt, (int) (format - beg_fmt), 10);
                        }