get_remote_group(): use skip_prefix()
[gitweb.git] / builtin / fetch.c
index bbc2bb885966cad4fead45d266d8db2bff1332b3..262809c78725a2a7924f1f806f40bf1a7577df11 100644 (file)
@@ -973,8 +973,7 @@ static int get_remote_group(const char *key, const char *value, void *priv)
 {
        struct remote_group_data *g = priv;
 
-       if (starts_with(key, "remotes.") &&
-                       !strcmp(key + 8, g->name)) {
+       if (skip_prefix(key, "remotes.", &key) && !strcmp(key, g->name)) {
                /* split list by white space */
                while (*value) {
                        size_t wordlen = strcspn(value, " \t\n");