aboutsummaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-10 14:03:46 -0700
committerJunio C Hamano <gitster@pobox.com>2016-10-10 14:03:46 -0700
commitb8688adb12d086b161aa7c369126bdd56843a01b (patch)
treec1d649861b902b5d72dcd8a0d3d970a2294bf5ef /t/helper
parenta23ca1b8dc42ffd4de2ef30d67ce1e21ded29886 (diff)
parent7e65c75c31de751f58945a22e91e120c10ab6e87 (diff)
downloadgit-b8688adb12d086b161aa7c369126bdd56843a01b.tar.gz
git-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 't/helper')
-rw-r--r--t/helper/test-dump-untracked-cache.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/t/helper/test-dump-untracked-cache.c b/t/helper/test-dump-untracked-cache.c
index 50112cc85..f752532ff 100644
--- a/t/helper/test-dump-untracked-cache.c
+++ b/t/helper/test-dump-untracked-cache.c
@@ -18,10 +18,8 @@ static int compare_dir(const void *a_, const void *b_)
static void dump(struct untracked_cache_dir *ucd, struct strbuf *base)
{
int i, len;
- qsort(ucd->untracked, ucd->untracked_nr, sizeof(*ucd->untracked),
- compare_untracked);
- qsort(ucd->dirs, ucd->dirs_nr, sizeof(*ucd->dirs),
- compare_dir);
+ QSORT(ucd->untracked, ucd->untracked_nr, compare_untracked);
+ QSORT(ucd->dirs, ucd->dirs_nr, compare_dir);
len = base->len;
strbuf_addf(base, "%s/", ucd->name);
printf("%s %s", base->buf,