summaryrefslogtreecommitdiff
path: root/src/submodule.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2018-05-24 19:05:59 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2018-05-24 19:05:59 +0200
commitc16ebaa6bd68d656e13c627f07920466846d5ab6 (patch)
tree8f5795df4b8e1830324f3e7242a6f72756ace02f /src/submodule.c
parent91a4849daf692a062b00b57484aba8b68ae1f481 (diff)
downloadlibgit2-c16ebaa6bd68d656e13c627f07920466846d5ab6.tar.gz
submodule: replace index with strchr which exists on Windows
Diffstat (limited to 'src/submodule.c')
-rw-r--r--src/submodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/submodule.c b/src/submodule.c
index 75657434a..4f7a6c613 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -374,7 +374,7 @@ int git_submodule_name_is_valid(git_repository *repo, const char *name, int flag
flags = GIT_PATH_REJECT_FILESYSTEM_DEFAULTS;
/* Avoid allocating a new string if we can avoid it */
- if (index(name, '\\')) {
+ if (strchr(name, '\\') != NULL) {
if ((error = git_path_normalize_slashes(&buf, name)) < 0)
return error;
} else {