a few more cleanups, use memcpy instead of strncpy

git-svn-id: https://svn.musicpd.org/mpd/trunk@55 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2004-02-25 18:42:47 +00:00
parent 1e9b166574
commit ca3068d411
1 changed files with 2 additions and 2 deletions

View File

@ -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';
}