X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/e9cbdf64632fbe64d6b0c4974ac947ef954938e7..35df710a1fa21b62c5328e2c98f29a68a0312a25:/ui-shared.c diff --git a/ui-shared.c b/ui-shared.c index 9a38aa9..e39d004 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -12,8 +12,7 @@ #include "html.h" static const char cgit_doctype[] = -"\n"; +"\n"; static char *http_date(time_t t) { @@ -254,7 +253,7 @@ static char *repolink(const char *title, const char *class, const char *page, } delim = "&"; } - if (head && strcmp(head, ctx.repo->defbranch)) { + if (head && ctx.repo->defbranch && strcmp(head, ctx.repo->defbranch)) { html(delim); html("h="); html_url_arg(head); @@ -723,7 +722,7 @@ void cgit_print_docstart(void) char *host = cgit_hosturl(); html(cgit_doctype); - html("\n"); + html("\n"); html("
\n"); html("