X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=cache-tree.c;h=2440d1dc89175efaf74286da4b2c8f97fc52fbd9;hb=f331ab9d4cb21942dcde6d879aaca6a1784e8cb6;hp=ec23d8c03d10bd3815f59c2d70ae5eb45170aaad;hpb=6e9b0108c6515510580da1698af893263f8cd7de;p=thirdparty%2Fgit.git diff --git a/cache-tree.c b/cache-tree.c index ec23d8c03d..2440d1dc89 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -131,9 +131,8 @@ static int do_invalidate_path(struct cache_tree *it, const char *path) * move 4 and 5 up one place (2 entries) * 2 = 6 - 3 - 1 = subtree_nr - pos - 1 */ - memmove(it->down+pos, it->down+pos+1, - sizeof(struct cache_tree_sub *) * - (it->subtree_nr - pos - 1)); + MOVE_ARRAY(it->down + pos, it->down + pos + 1, + it->subtree_nr - pos - 1); it->subtree_nr--; } return 1;