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:
Lukas Fleischer 2014-01-10 12:44:35 +01:00 committed by Jason A. Donenfeld
parent d523dacc3b
commit 36bdb2171f
6 changed files with 20 additions and 20 deletions

View file

@ -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);