Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Sort with git's QSORT
QSORT skips a list of fewer than two entries, so an empty list's null base never reaches qsort, which is what cgit_qsort was written for.
Diffstat (limited to '')
-rw-r--r--source/ui-stats.c2
1 file changed, 1 insertion, 1 deletion
diff --git a/source/ui-stats.c b/source/ui-stats.c
index 06ec2bc..1c4d654 100644
--- a/source/ui-stats.c
+++ b/source/ui-stats.c
@@ -421,7 +421,7 @@ void cgit_show_stats(void)
}
if (collect_stats(period, &authors))
return;
- cgit_qsort(authors.items, authors.nr, sizeof(struct string_list_item), cmp_total_commits);
+ QSORT(authors.items, authors.nr, cmp_total_commits);
top = ctx.qry.ofs;
if (!top)