summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-11 20:26:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-11 20:26:57 (GMT)
commit32f90258bd510d84dfe8970211ec1427e9e327dc (patch)
tree6727e0574f5c648aec927e43545617b0c5fca32e /commit.c
parentc2bfd0f9cba5e94c08dcc1033d39d7bef29be08e (diff)
parent168e63554cbd965fee4d0092e02f8170eba7481f (diff)
downloadgit-32f90258bd510d84dfe8970211ec1427e9e327dc.zip
git-32f90258bd510d84dfe8970211ec1427e9e327dc.tar.gz
git-32f90258bd510d84dfe8970211ec1427e9e327dc.tar.bz2
Merge branch 'rs/move-array'
Code clean-up. * rs/move-array: ls-files: don't try to prune an empty index apply: use COPY_ARRAY and MOVE_ARRAY in update_image() use MOVE_ARRAY add MOVE_ARRAY
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/commit.c b/commit.c
index b0bb356..8b28415 100644
--- a/commit.c
+++ b/commit.c
@@ -223,9 +223,8 @@ int unregister_shallow(const struct object_id *oid)
if (pos < 0)
return -1;
if (pos + 1 < commit_graft_nr)
- memmove(commit_graft + pos, commit_graft + pos + 1,
- sizeof(struct commit_graft *)
- * (commit_graft_nr - pos - 1));
+ MOVE_ARRAY(commit_graft + pos, commit_graft + pos + 1,
+ commit_graft_nr - pos - 1);
commit_graft_nr--;
return 0;
}