From 7beb7e66b3f0061d5707b0aba567320435042f2d Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 30 Oct 2026 21:52:44 -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 2.12.1