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-repolist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/ui-repolist.c') diff --git a/source/ui-repolist.c b/source/ui-repolist.c index d2552a6..cd961bf 100644 --- a/source/ui-repolist.c +++ b/source/ui-repolist.c @@ -375,7 +375,7 @@ static int sort_repolist(const char *field) continue; if (column->cmp == cmp_idle || column->cmp == cmp_section) resolve_modtimes(); - cgit_qsort(cgit_repolist.repos, cgit_repolist.count, sizeof(struct cgit_repo), column->cmp); + QSORT(cgit_repolist.repos, cgit_repolist.count, column->cmp); return 1; } return 0; -- cgit