/* ui-shared.c: common web output functions
*
- * Copyright (C) 2006 Lars Hjemli
+ * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com>
*
* Licensed under GNU General Public License v2
* (see COPYING for full license text)
/* 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 */
if (ctx->repo->max_stats)
cgit_stats_link("stats", NULL, hc(ctx, "stats"),
ctx->qry.head, ctx->qry.vpath);
- if (ctx->repo->readme)
+ if (ctx->repo->readme.nr)
reporevlink("about", "about", NULL,
hc(ctx, "about"), ctx->qry.head, NULL,
NULL);