]> gitweb.ps.run Git - ps-cgit/blobdiff - scan-tree.c
Replace most uses of strncmp() with prefixcmp()
[ps-cgit] / scan-tree.c
index 1a2ea87e5008afe396df231114fabb59df8ce1b2..49de6583ff55852b6bd5af1c063e21d03d7c1d5d 100644 (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);