use QSORT
Apply the semantic patch contrib/coccinelle/qsort.cocci to the code base, replacing calls of qsort(3) with QSORT. The resulting code is shorter and supports empty arrays with NULL pointers. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
dbc540c7a5
commit
9ed0d8d6e6
@ -385,8 +385,7 @@ void bitmap_writer_select_commits(struct commit **indexed_commits,
|
||||
{
|
||||
unsigned int i = 0, j, next;
|
||||
|
||||
qsort(indexed_commits, indexed_commits_nr, sizeof(indexed_commits[0]),
|
||||
date_compare);
|
||||
QSORT(indexed_commits, indexed_commits_nr, date_compare);
|
||||
|
||||
if (writer.show_progress)
|
||||
writer.progress = start_progress("Selecting bitmap commits", 0);
|
||||
|
Reference in New Issue
Block a user