From 1b5294de406146c4ec321a59e07a5566c435cc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Fri, 30 Sep 2016 01:40:14 +0200 Subject: use QSORT, part 2 Convert two more qsort(3) calls to QSORT to reduce code size and for better safety and consistency. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- builtin/shortlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/shortlog.c') diff --git a/builtin/shortlog.c b/builtin/shortlog.c index 25fa8a6aed..ba0e1154a9 100644 --- a/builtin/shortlog.c +++ b/builtin/shortlog.c @@ -308,7 +308,7 @@ void shortlog_output(struct shortlog *log) struct strbuf sb = STRBUF_INIT; if (log->sort_by_number) - qsort(log->list.items, log->list.nr, sizeof(struct string_list_item), + QSORT(log->list.items, log->list.nr, log->summary ? compare_by_counter : compare_by_list); for (i = 0; i < log->list.nr; i++) { const struct string_list_item *item = &log->list.items[i]; -- cgit v1.2.3