summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-09-02 13:18:25 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-09-02 13:18:25 -0700
commit8a728644263b470a6f1ac482b5c141ca61594ab8 (patch)
treec515582b30a6043dbccbbd6a0eaed137438888e1
parentMerge branch 'tr/maint-format-patch-empty-output' (diff)
parentUse memmove in ident_to_git (diff)
downloadtgif-8a728644263b470a6f1ac482b5c141ca61594ab8.tar.xz
Merge branch 'tr/maint-ident-to-git-memmove'
* tr/maint-ident-to-git-memmove: Use memmove in ident_to_git
-rw-r--r--convert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/convert.c b/convert.c
index 416bf83c75..3bb5a4dd57 100644
--- a/convert.c
+++ b/convert.c
@@ -533,7 +533,7 @@ static int ident_to_git(const char *path, const char *src, size_t len,
dollar = memchr(src, '$', len);
if (!dollar)
break;
- memcpy(dst, src, dollar + 1 - src);
+ memmove(dst, src, dollar + 1 - src);
dst += dollar + 1 - src;
len -= dollar + 1 - src;
src = dollar + 1;
@@ -553,7 +553,7 @@ static int ident_to_git(const char *path, const char *src, size_t len,
src = dollar + 1;
}
}
- memcpy(dst, src, len);
+ memmove(dst, src, len);
strbuf_setlen(buf, dst + len - buf->buf);
return 1;
}