mirror of
https://git.zx2c4.com/cgit
synced 2025-06-27 12:08:55 +02:00
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:
parent
d523dacc3b
commit
36bdb2171f
6 changed files with 20 additions and 20 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue