aboutsummaryrefslogtreecommitdiff
path: root/http-push.c
diff options
context:
space:
mode:
authorDennis Stosberg <dennis@stosberg.net>2006-04-11 18:37:58 +0200
committerJunio C Hamano <junkio@cox.net>2006-04-11 11:45:37 -0700
commitef9e58c826a4fcaa13457cd8177518163f82972a (patch)
tree944a5b90525514d0942c01293679e137c0324c6f /http-push.c
parent40d88d4fa3b13c0e7fe8eca23ff6d27e790bada2 (diff)
downloadgit-ef9e58c826a4fcaa13457cd8177518163f82972a.tar.gz
git-ef9e58c826a4fcaa13457cd8177518163f82972a.tar.xz
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-push.c')
-rw-r--r--http-push.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/http-push.c b/http-push.c
index 57cefdea5..994ee9003 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1211,7 +1211,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)
@@ -1240,7 +1240,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);
@@ -2350,7 +2350,7 @@ int main(int argc, char **argv)
char *path = strstr(arg, "//");
remote->url = arg;
if (path) {
- path = index(path+2, '/');
+ path = strchr(path+2, '/');
if (path)
remote->path_len = strlen(path);
}