summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e27e609)
raw | patch | inline | side by side (parent: e27e609)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 4 Jan 2007 08:06:50 +0000 (00:06 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 5 Jan 2007 06:28:46 +0000 (22:28 -0800) |
There was an obvious thinko in memmove() to remove an entry that
was resolved from the in-core data structure.
Signed-off-by: Junio C Hamano <junkio@cox.net>
was resolved from the in-core data structure.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-rerere.c | patch | blob | history |
diff --git a/builtin-rerere.c b/builtin-rerere.c
index 7442498deedfef1f6be9e550f3c0259aaa82e0ba..079c0bdf36abce6a34af2678f7efbb56dfcfdf41 100644 (file)
--- a/builtin-rerere.c
+++ b/builtin-rerere.c
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--;
}