From 15c9e9dfb13a77d1d0798cd97cc5aafc856b077c Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:52:38 -0700 Subject: 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. --- source/ui-stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/ui-stats.c') 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) -- cgit