Fix C compatible
@@ -734,16 +734,17 @@ extract_method (const char *token)
const int list_count = sizeof(list) / sizeof(*list);
+ int i;
// Length of every string in list
static int list_length[sizeof(list) / sizeof(*list)] = { -1 };
// Only calculate length on first time
if (list_length[0] == -1) {
- for (int i=0; i < list_count; i++) {
+ for (i=0; i < list_count; i++) {
list_length[i] = strlen(list[i]);
}
}
- for (int i=0; i < list_count; i++) {
+ for (i=0; i < list_count; i++) {
if (strncmp(token, list[i], list_length[i]) == 0) {
return list[i];
}
