summaryrefslogtreecommitdiff
path: root/cache-tree.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-02-13 13:39:13 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-02-13 13:39:13 -0800
commitcbf0240f82fc6b7072c7d18fa56caace4902a44b (patch)
tree5bf09c102c34b2984b2a09ac658afd673e876fd3 /cache-tree.c
parentMerge branch 'tg/split-index-fixes' (diff)
parentUse MOVE_ARRAY (diff)
downloadtgif-cbf0240f82fc6b7072c7d18fa56caace4902a44b.tar.xz
Merge branch 'sg/cocci-move-array'
Code clean-up. * sg/cocci-move-array: Use MOVE_ARRAY
Diffstat (limited to 'cache-tree.c')
-rw-r--r--cache-tree.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cache-tree.c b/cache-tree.c
index 0dd6292a94..3841cef0c0 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -84,9 +84,8 @@ static struct cache_tree_sub *find_subtree(struct cache_tree *it,
down->namelen = pathlen;
if (pos < it->subtree_nr)
- memmove(it->down + pos + 1,
- it->down + pos,
- sizeof(down) * (it->subtree_nr - pos - 1));
+ MOVE_ARRAY(it->down + pos + 1, it->down + pos,
+ it->subtree_nr - pos - 1);
it->down[pos] = down;
return down;
}