diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-02-13 22:39:13 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-13 22:39:13 +0100 |
commit | cbf0240f82fc6b7072c7d18fa56caace4902a44b (patch) | |
tree | 5bf09c102c34b2984b2a09ac658afd673e876fd3 /cache-tree.c | |
parent | Merge branch 'tg/split-index-fixes' (diff) | |
parent | Use MOVE_ARRAY (diff) | |
download | git-cbf0240f82fc6b7072c7d18fa56caace4902a44b.tar.xz git-cbf0240f82fc6b7072c7d18fa56caace4902a44b.zip |
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.c | 5 |
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; } |