diff options
author | Dennis Stosberg <dennis@stosberg.net> | 2006-04-11 18:37:58 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-04-11 11:45:37 -0700 |
commit | ef9e58c826a4fcaa13457cd8177518163f82972a (patch) | |
tree | 944a5b90525514d0942c01293679e137c0324c6f /http-fetch.c | |
parent | 40d88d4fa3b13c0e7fe8eca23ff6d27e790bada2 (diff) | |
download | git-ef9e58c826a4fcaa13457cd8177518163f82972a.tar.gz |
Replace index() with strchr().
strchr() is more portable than index() and is used everywhere in
git already.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'http-fetch.c')
-rw-r--r-- | http-fetch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/http-fetch.c b/http-fetch.c index 71a7dafd69..861644b27e 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); } |