Replace most uses of strncmp() with prefixcmp()
This is a preparation for replacing all prefix checks with either strip_prefix() or starts_with() when Git 1.8.6 is released. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
This commit is contained in:

committed by
Jason A. Donenfeld

parent
d523dacc3b
commit
36bdb2171f
@ -105,7 +105,7 @@ static void add_repo(const char *base, struct strbuf *path, repo_config_fn fn)
|
||||
return;
|
||||
strbuf_setlen(path, pathlen);
|
||||
|
||||
if (strncmp(base, path->buf, strlen(base)))
|
||||
if (prefixcmp(path->buf, base))
|
||||
strbuf_addbuf(&rel, path);
|
||||
else
|
||||
strbuf_addstr(&rel, path->buf + strlen(base) + 1);
|
||||
|
Reference in New Issue
Block a user