summaryrefslogtreecommitdiff
path: root/convert.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-09-02 13:18:25 -0700
committerJunio C Hamano <gitster@pobox.com>2011-09-02 13:18:25 -0700
commit8a728644263b470a6f1ac482b5c141ca61594ab8 (patch)
treec515582b30a6043dbccbbd6a0eaed137438888e1 /convert.c
parentc14bd209318f6801aa3ebe36f3f6130459a6beeb (diff)
parent7732118438764cfe49b8e0ad2c63e6dc97be45ed (diff)
downloadgit-8a728644263b470a6f1ac482b5c141ca61594ab8.tar.gz
Merge branch 'tr/maint-ident-to-git-memmove'
* tr/maint-ident-to-git-memmove: Use memmove in ident_to_git
Diffstat (limited to 'convert.c')
-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;
}