From 36bdb2171f7154fcdf1a24d38c8ce3bd7e448cb1 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 10 Jan 2014 12:44:35 +0100 Subject: 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 --- scan-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scan-tree.c') diff --git a/scan-tree.c b/scan-tree.c index 1a2ea87..49de658 100644 --- a/scan-tree.c +++ b/scan-tree.c @@ -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); -- cgit v1.2.3-70-g09d2