pud: nmealib: fix invalid format string conversion
authorFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 22 Oct 2012 12:28:36 +0000 (14:28 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 22 Oct 2012 13:02:51 +0000 (15:02 +0200)
Coverity:
CID 739671 (#1 of 1): Printf format string issue (PW.BAD_PRINTF_FORMAT_STRING)
At (1): invalid format string conversion

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/nmealib/src/generate.c

index 4a51b50..cd425f6 100644 (file)
@@ -269,7 +269,7 @@ int nmea_gen_GPRMC(char *s, const int len, const nmeaGPRMC *pack) {
                sMagvar_ew[0] = pack->magvar_ew;
        }
 
-       return nmea_printf(s, len, "$GPRMC,%s,%C,%s,%s,%s,%s,%s,%s,%s,%s,%s,%C", &sTime[0], pack->status, &sLat[0], &sNs[0],
+       return nmea_printf(s, len, "$GPRMC,%s,%c,%s,%s,%s,%s,%s,%s,%s,%s,%s,%c", &sTime[0], pack->status, &sLat[0], &sNs[0],
                        &sLon[0], &sEw[0], &sSpeed[0], &sTrack[0], &sDate[0], &sMagvar[0], &sMagvar_ew[0], pack->mode);
 }