diff --git a/minmea.c b/minmea.c index b40e07f..19957ed 100644 --- a/minmea.c +++ b/minmea.c @@ -221,8 +221,8 @@ bool minmea_scan(const char *sentence, const char *format, ...) if (field[0] != '$') goto parse_error; - for (int i=0; i<5; i++) - if (!minmea_isfield(field[1+i])) + for (int f=0; f<5; f++) + if (!minmea_isfield(field[f+i])) goto parse_error; char *buf = va_arg(ap, char *); @@ -237,8 +237,8 @@ bool minmea_scan(const char *sentence, const char *format, ...) if (field && minmea_isfield(*field)) { // Always six digits. - for (int i=0; i<6; i++) - if (!isdigit((unsigned char) field[i])) + for (int f=0; f<6; f++) + if (!isdigit((unsigned char) field[f])) goto parse_error; d = strtol((char[]) {field[0], field[1], '\0'}, NULL, 10); @@ -258,8 +258,8 @@ bool minmea_scan(const char *sentence, const char *format, ...) if (field && minmea_isfield(*field)) { // Minimum required: integer time. - for (int i=0; i<6; i++) - if (!isdigit((unsigned char) field[i])) + for (int f=0; f<6; f++) + if (!isdigit((unsigned char) field[f])) goto parse_error; h = strtol((char[]) {field[0], field[1], '\0'}, NULL, 10);