Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-rerere.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin-rerere.c b/builtin-rerere.c
index 7442498dee..079c0bdf36 100644
--- a/builtin-rerere.c
+++ b/builtin-rerere.c
@@ -350,11 +350,10 @@ static int do_plain_rerere(struct path_list *rr, int fd)
fprintf(stderr, "Recorded resolution for '%s'.\n", path);
copy_file(path, rr_path(name, "postimage"));
tail_optimization:
- if (i < rr->nr - 1) {
+ if (i < rr->nr - 1)
memmove(rr->items + i,
- rr->items + i + 1,
- rr->nr - i - 1);
- }
+ rr->items + i + 1,
+ sizeof(rr->items[0]) * (rr->nr - i - 1));
rr->nr--;
i--;
}