aboutsummaryrefslogtreecommitdiffstats
path: root/notes-merge.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-11 13:26:57 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-11 13:26:57 -0700
commit32f90258bd510d84dfe8970211ec1427e9e327dc (patch)
tree6727e0574f5c648aec927e43545617b0c5fca32e /notes-merge.c
parentMerge branch 'rs/bswap-ubsan-fix' (diff)
parentls-files: don't try to prune an empty index (diff)
downloadgit-32f90258bd510d84dfe8970211ec1427e9e327dc.tar.gz
git-32f90258bd510d84dfe8970211ec1427e9e327dc.zip
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 'notes-merge.c')
-rw-r--r--notes-merge.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/notes-merge.c b/notes-merge.c
index 70e3fbeefb..c12b354f10 100644
--- a/notes-merge.c
+++ b/notes-merge.c
@@ -99,8 +99,7 @@ static struct notes_merge_pair *find_notes_merge_pair_pos(
else {
*occupied = 0;
if (insert_new && i < len) {
- memmove(list + i + 1, list + i,
- (len - i) * sizeof(struct notes_merge_pair));
+ MOVE_ARRAY(list + i + 1, list + i, len - i);
memset(list + i, 0, sizeof(struct notes_merge_pair));
}
}