]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-refs.c
ui-snapshot: set unused cgit_filter fields to zero
[ps-cgit] / ui-refs.c
index 0ae0612665e95c3254aa6a3ed769f5f355cf5b12..20c91e3c2401d7da4d6fa3c634623ef60f71e5fe 100644 (file)
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -1,6 +1,6 @@
 /* ui-refs.c: browse symbolic refs
  *
- * 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)
@@ -240,9 +240,9 @@ void cgit_print_refs()
 
        html("<table class='list nowrap'>");
 
-       if (ctx.qry.path && !strncmp(ctx.qry.path, "heads", 5))
+       if (ctx.qry.path && !prefixcmp(ctx.qry.path, "heads"))
                cgit_print_branches(0);
-       else if (ctx.qry.path && !strncmp(ctx.qry.path, "tags", 4))
+       else if (ctx.qry.path && !prefixcmp(ctx.qry.path, "tags"))
                cgit_print_tags(0);
        else {
                cgit_print_branches(0);