]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-stats.c
cgitrc.5: add local tar signature example
[cgit.git] / ui-stats.c
index a9c13fd4c5e930278ce784960fb85f9234dd0a81..7acd358d0f1ca7a137ae901481ae36b1d3374cfd 100644 (file)
@@ -184,9 +184,9 @@ static void add_commit(struct string_list *authors, struct commit *commit,
        period->trunc(date);
        tmp = xstrdup(period->pretty(date));
        item = string_list_insert(items, tmp);
-       if (item->util)
-               free(tmp);
        counter = (uintptr_t *)&item->util;
+       if (*counter)
+               free(tmp);
        (*counter)++;
 
        authorstat->total++;
@@ -389,7 +389,7 @@ void cgit_show_stats(void)
        cgit_print_layout_start();
        html("<div class='cgit-panel'>");
        html("<b>stat options</b>");
-       html("<form method='get' action=''>");
+       html("<form method='get'>");
        cgit_add_hidden_formfields(1, 0, "stats");
        html("<table><tr><td colspan='2'/></tr>");
        if (ctx.repo->max_stats > 1) {