minor: strncpy -> strcpy and formatting

This commit is contained in:
Olof hagsand 2020-10-10 15:32:19 +02:00
parent f8ac8cc14b
commit f9cc26582a
3 changed files with 8 additions and 4 deletions

View file

@ -107,7 +107,7 @@ clicon_strsep(char *string,
}
memset(vec, 0, siz);
ptr = (char*)vec + (nvec+1)* sizeof(char*); /* this is where ptr starts */
strncpy(ptr, string, strlen(string)+1);
strcpy(ptr, string);
i = 0;
while ((p = strsep(&ptr, delim)) != NULL)
vec[i++] = p;