summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-23 14:33:46 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-23 14:33:46 -0700
commitd3b7ee087e3ed409b943d62501bd7fb8dbd96dd8 (patch)
tree1ed0f2f407610d50b984a4fa9b95bb72eaa17c14 /commit.c
parent752732c6d802ebc01a26e59614da38f900e3b89e (diff)
parent168e63554cbd965fee4d0092e02f8170eba7481f (diff)
downloadgit-d3b7ee087e3ed409b943d62501bd7fb8dbd96dd8.tar.gz
Merge branch 'rs/move-array' into maint
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 cbfd689939..d3150d6270 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;
}