aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-02-25 18:42:47 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-02-25 18:42:47 +0000
commitca3068d411dc60bf6de2eb88f73c6f91486e8260 (patch)
tree3065a695dd5b4b5ad2a1c91f3682f5975d2894b2 /src
parent1e9b166574c8da323fb2868876730dc5674b9a84 (diff)
downloadmpd-ca3068d411dc60bf6de2eb88f73c6f91486e8260.tar.gz
mpd-ca3068d411dc60bf6de2eb88f73c6f91486e8260.tar.xz
mpd-ca3068d411dc60bf6de2eb88f73c6f91486e8260.zip
a few more cleanups, use memcpy instead of strncpy
git-svn-id: https://svn.musicpd.org/mpd/trunk@55 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/charConv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/charConv.c b/src/charConv.c
index 636a1e066..cb8db75c2 100644
--- a/src/charConv.c
+++ b/src/charConv.c
@@ -57,7 +57,7 @@ char * convStrDup(char * string) {
size_t inleft = strlen(string);
char * ret;
size_t outleft;
- int retlen = 0;
+ size_t retlen = 0;
size_t err;
char * bufferPtr;
@@ -76,7 +76,7 @@ char * convStrDup(char * string) {
}
ret = realloc(ret,retlen+BUFFER_SIZE-outleft+1);
- strncpy(&(ret[retlen]),buffer,BUFFER_SIZE-outleft);
+ memcpy(&(ret[retlen]),buffer,BUFFER_SIZE-outleft);
retlen+=BUFFER_SIZE-outleft;
ret[retlen] = '\0';
}