Browse Source

get_remote_group(): rename local variable "space" to "wordlen"

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Michael Haggerty 10 years ago committed by Junio C Hamano
parent
commit
e286542de0
  1. 10
      builtin/fetch.c

10
builtin/fetch.c

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



Loading…
Cancel
Save