summaryrefslogtreecommitdiff
path: root/cache-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-02-13 21:39:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-13 21:39:13 (GMT)
commitcbf0240f82fc6b7072c7d18fa56caace4902a44b (patch)
tree5bf09c102c34b2984b2a09ac658afd673e876fd3 /cache-tree.c
parente75c862125f219c983cd2980d1b33ec09a3c34b9 (diff)
parentf919ffebed3c570bf3c2a5f36444527ea5df42de (diff)
downloadgit-cbf0240f82fc6b7072c7d18fa56caace4902a44b.zip
git-cbf0240f82fc6b7072c7d18fa56caace4902a44b.tar.gz
git-cbf0240f82fc6b7072c7d18fa56caace4902a44b.tar.bz2
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 0dd6292..3841cef 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;
}