if (starts_with(key, "remotes.") &&
!strcmp(key + 8, g->name)) {
/* split list by white space */
- int space = strcspn(value, " \t\n");
+ size_t wordlen = strcspn(value, " \t\n");
while (*value) {
- if (space >= 1)
+ if (wordlen >= 1)
string_list_append(g->list,
- xstrndup(value, space));
- value += space + (value[space] != '\0');
- space = strcspn(value, " \t\n");
+ xstrndup(value, wordlen));
+ value += wordlen + (value[wordlen] != '\0');
+ wordlen = strcspn(value, " \t\n");
}
}