summaryrefslogtreecommitdiff
path: root/rerere.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-02-13 13:39:13 -0800
committerJunio C Hamano <gitster@pobox.com>2018-02-13 13:39:13 -0800
commitcbf0240f82fc6b7072c7d18fa56caace4902a44b (patch)
tree5bf09c102c34b2984b2a09ac658afd673e876fd3 /rerere.c
parente75c862125f219c983cd2980d1b33ec09a3c34b9 (diff)
parentf919ffebed3c570bf3c2a5f36444527ea5df42de (diff)
downloadgit-cbf0240f82fc6b7072c7d18fa56caace4902a44b.tar.gz
Merge branch 'sg/cocci-move-array'
Code clean-up. * sg/cocci-move-array: Use MOVE_ARRAY
Diffstat (limited to 'rerere.c')
-rw-r--r--rerere.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rerere.c b/rerere.c
index 1ce440f4bb..79203c6c1e 100644
--- a/rerere.c
+++ b/rerere.c
@@ -159,8 +159,8 @@ static struct rerere_dir *find_rerere_dir(const char *hex)
ALLOC_GROW(rerere_dir, rerere_dir_nr + 1, rerere_dir_alloc);
/* ... and add it in. */
rerere_dir_nr++;
- memmove(rerere_dir + pos + 1, rerere_dir + pos,
- (rerere_dir_nr - pos - 1) * sizeof(*rerere_dir));
+ MOVE_ARRAY(rerere_dir + pos + 1, rerere_dir + pos,
+ rerere_dir_nr - pos - 1);
rerere_dir[pos] = rr_dir;
scan_rerere_dir(rr_dir);
}