X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=http-fetch.c;h=178f1ee311dd7db8ad6c2d10babde1a8c8fe7ebd;hb=31262627109476c529418132e0820687003fb1fe;hp=71a7dafd696d0da3a9662fb19cd83f87df1ec9b4;hpb=38b525e09f9088338e03ad0169e3cc7b5ab2e7af;p=git.git diff --git a/http-fetch.c b/http-fetch.c index 71a7dafd..178f1ee3 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -597,7 +597,7 @@ static void process_alternates_response(void *callback_data) newalt->packs = NULL; path = strstr(target, "//"); if (path) { - path = index(path+2, '/'); + path = strchr(path+2, '/'); if (path) newalt->path_len = strlen(path); } @@ -678,7 +678,7 @@ static void xml_start_tag(void *userData, const char *name, const char **atts) { struct xml_ctx *ctx = (struct xml_ctx *)userData; - const char *c = index(name, ':'); + const char *c = strchr(name, ':'); int new_len; if (c == NULL) @@ -707,7 +707,7 @@ static void xml_end_tag(void *userData, const char *name) { struct xml_ctx *ctx = (struct xml_ctx *)userData; - const char *c = index(name, ':'); + const char *c = strchr(name, ':'); char *ep; ctx->userFunc(ctx, 1); @@ -1261,7 +1261,7 @@ int main(int argc, char **argv) alt->next = NULL; path = strstr(url, "//"); if (path) { - path = index(path+2, '/'); + path = strchr(path+2, '/'); if (path) alt->path_len = strlen(path); } @@ -1269,10 +1269,10 @@ int main(int argc, char **argv) if (pull(commit_id)) rc = 1; - curl_slist_free_all(no_pragma_header); - http_cleanup(); + curl_slist_free_all(no_pragma_header); + if (corrupt_object_found) { fprintf(stderr, "Some loose object were found to be corrupt, but they might be just\n"