diff options
author | René Scharfe <l.s.r@web.de> | 2016-09-29 17:27:31 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-29 15:42:18 -0700 |
commit | 9ed0d8d6e6de7737fe9a658446318b86e57c6fad (patch) | |
tree | 82fdefc7bd543c99091f5b634947360f75100deb /bisect.c | |
parent | dbc540c7a5827529a3f58befc9e5b81a31ec8fab (diff) | |
download | git-9ed0d8d6e6de7737fe9a658446318b86e57c6fad.tar.gz |
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>
Diffstat (limited to 'bisect.c')
-rw-r--r-- | bisect.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -215,7 +215,7 @@ static struct commit_list *best_bisection_sorted(struct commit_list *list, int n array[cnt].distance = distance; cnt++; } - qsort(array, cnt, sizeof(*array), compare_commit_dist); + QSORT(array, cnt, compare_commit_dist); for (p = list, i = 0; i < cnt; i++) { char buf[100]; /* enough for dist=%d */ struct object *obj = &(array[i].commit->object); |