summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6dcfa30)
raw | patch | inline | side by side (parent: 6dcfa30)
author | Edgar Toernig <froese@gmx.de> | |
Tue, 31 Oct 2006 01:44:27 +0000 (17:44 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 31 Oct 2006 01:44:27 +0000 (17:44 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-unpack-objects.c | patch | blob | history | |
index-pack.c | patch | blob | history |
index e70a71163d18dff1dd182c0d0b02967044693884..74a90c1129d0ff2f772db937d6f9a0ac4e2589a4 100644 (file)
--- a/builtin-unpack-objects.c
+++ b/builtin-unpack-objects.c
* Make sure at least "min" bytes are available in the buffer, and
* return the pointer to the buffer.
*/
-static void * fill(int min)
+static void *fill(int min)
{
if (min <= len)
return buffer + offset;
die("cannot fill %d bytes", min);
if (offset) {
SHA1_Update(&ctx, buffer, offset);
- memcpy(buffer, buffer + offset, len);
+ memmove(buffer, buffer + offset, len);
offset = 0;
}
do {
diff --git a/index-pack.c b/index-pack.c
index e33f60524f240f288df7dc6d398486d1d6e7e5ee..70640e14d8370d83c15a01aa13ac1b6183c8b6c5 100644 (file)
--- a/index-pack.c
+++ b/index-pack.c
* Make sure at least "min" bytes are available in the buffer, and
* return the pointer to the buffer.
*/
-static void * fill(int min)
+static void *fill(int min)
{
if (min <= input_len)
return input_buffer + input_offset;
die("cannot fill %d bytes", min);
if (input_offset) {
SHA1_Update(&input_ctx, input_buffer, input_offset);
- memcpy(input_buffer, input_buffer + input_offset, input_len);
+ memmove(input_buffer, input_buffer + input_offset, input_len);
input_offset = 0;
}
do {