Merge branch 'maint'
[gitweb.git] / help.c
diff --git a/help.c b/help.c
index b6674635a2e08197cc13aaa6acbe6290a303d6b3..0893fea0254f4ec8acbce82a0af41e4e61bd72a6 100644 (file)
--- a/help.c
+++ b/help.c
@@ -130,7 +130,7 @@ static void list_commands(const char *exec_path, const char *pattern)
                struct stat st;
                int entlen;
 
-               if (strncmp(de->d_name, "git-", 4))
+               if (prefixcmp(de->d_name, "git-"))
                        continue;
                strcpy(path+dirlen, de->d_name);
                if (stat(path, &st) || /* stat, not lstat */
@@ -179,7 +179,7 @@ static void show_man_page(const char *git_cmd)
 {
        const char *page;
 
-       if (!strncmp(git_cmd, "git", 3))
+       if (!prefixcmp(git_cmd, "git"))
                page = git_cmd;
        else {
                int page_len = strlen(git_cmd) + 4;