summaryrefslogtreecommitdiffstats
path: root/sha1-array.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-10 23:03:46 +0200
committerJunio C Hamano <gitster@pobox.com>2016-10-10 23:03:46 +0200
commitb8688adb12d086b161aa7c369126bdd56843a01b (patch)
treec1d649861b902b5d72dcd8a0d3d970a2294bf5ef /sha1-array.c
parentEighth batch for 2.11 (diff)
parentshow-branch: use QSORT (diff)
downloadgit-b8688adb12d086b161aa7c369126bdd56843a01b.tar.xz
git-b8688adb12d086b161aa7c369126bdd56843a01b.zip
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 'sha1-array.c')
-rw-r--r--sha1-array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1-array.c b/sha1-array.c
index af1d7d560d..c1cc25cd95 100644
--- a/sha1-array.c
+++ b/sha1-array.c
@@ -16,7 +16,7 @@ static int void_hashcmp(const void *a, const void *b)
static void sha1_array_sort(struct sha1_array *array)
{
- qsort(array->sha1, array->nr, sizeof(*array->sha1), void_hashcmp);
+ QSORT(array->sha1, array->nr, void_hashcmp);
array->sorted = 1;
}