Commit d1aaa5e2 by Carlos Martín Nieto Committed by Patrick Steinhardt

submodule: replace index with strchr which exists on Windows

parent f78b6907
...@@ -324,7 +324,7 @@ int git_submodule_name_is_valid(git_repository *repo, const char *name, int flag ...@@ -324,7 +324,7 @@ int git_submodule_name_is_valid(git_repository *repo, const char *name, int flag
flags = GIT_PATH_REJECT_FILESYSTEM_DEFAULTS; flags = GIT_PATH_REJECT_FILESYSTEM_DEFAULTS;
/* Avoid allocating a new string if we can avoid it */ /* 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) if ((error = git_path_normalize_slashes(&buf, name)) < 0)
return error; return error;
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment