summaryrefslogtreecommitdiff
path: root/diffcore-delta.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-10-10 14:03:46 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-10-10 14:03:46 -0700
commitb8688adb12d086b161aa7c369126bdd56843a01b (patch)
treec1d649861b902b5d72dcd8a0d3d970a2294bf5ef /diffcore-delta.c
parentEighth batch for 2.11 (diff)
parentshow-branch: use QSORT (diff)
downloadtgif-b8688adb12d086b161aa7c369126bdd56843a01b.tar.xz
Merge branch 'rs/qsort'
We call "qsort(array, nelem, sizeof(array[0]), fn)", and most of the time third parameter is redundant. A new QSORT() macro lets us omit it. * rs/qsort: show-branch: use QSORT use QSORT, part 2 coccicheck: use --all-includes by default remove unnecessary check before QSORT use QSORT add QSORT
Diffstat (limited to 'diffcore-delta.c')
-rw-r--r--diffcore-delta.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/diffcore-delta.c b/diffcore-delta.c
index 4159748a70..2ebedb32d1 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;
}