]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-shared.c
Replace most uses of strncmp() with prefixcmp()
[ps-cgit] / ui-shared.c
index d32852f4d213a933be4c3ee9165bc40cbb5fb594..2c12de73d7cea9885f31fa58e0b5b325088b436e 100644 (file)
@@ -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 */