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>
这个提交包含在:
@@ -120,7 +120,7 @@ const char *cgit_repobasename(const char *reponame)
|
||||
/* strip trailing slashes */
|
||||
while (p && rvbuf[p] == '/') rvbuf[p--] = 0;
|
||||
/* strip trailing .git */
|
||||
if (p >= 3 && !strncmp(&rvbuf[p-3], ".git", 4)) {
|
||||
if (p >= 3 && !prefixcmp(&rvbuf[p-3], ".git")) {
|
||||
p -= 3; rvbuf[p--] = 0;
|
||||
}
|
||||
/* strip more trailing slashes if any */
|
||||
|
在新工单中引用
屏蔽一个用户