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 /diffcore-delta.c | |
parent | dbc540c7a5827529a3f58befc9e5b81a31ec8fab (diff) | |
download | git-9ed0d8d6e6de7737fe9a658446318b86e57c6fad.tar.gz git-9ed0d8d6e6de7737fe9a658446318b86e57c6fad.tar.xz |
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 'diffcore-delta.c')
-rw-r--r-- | diffcore-delta.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/diffcore-delta.c b/diffcore-delta.c index 4159748a7..2ebedb32d 100644 --- a/diffcore-delta.c +++ b/diffcore-delta.c @@ -158,10 +158,7 @@ static struct spanhash_top *hash_chars(struct diff_filespec *one) n = 0; accum1 = accum2 = 0; } - qsort(hash->data, - 1ul << hash->alloc_log2, - sizeof(hash->data[0]), - spanhash_cmp); + QSORT(hash->data, 1ul << hash->alloc_log2, spanhash_cmp); return hash; } |