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
This commit is contained in:
Junio C Hamano
2016-10-10 14:03:46 -07:00
35 changed files with 97 additions and 78 deletions

View File

@ -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;
}