Correct warning if used -Wextra
This commit is contained in:
parent
3b8246dd44
commit
fc6afeda5b
@ -144,7 +144,7 @@ static unsigned char __compile_and_equals_sflag(char* flags, char* str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static char* malloc_str(char* str) {
|
static char* malloc_str(char* str) {
|
||||||
char* ptr = malloc((strlen(str)) * sizeof(char) + sizeof(char));
|
char* ptr = (char*)malloc((strlen(str)) * sizeof(char) + sizeof(char));
|
||||||
strcpy(ptr, str);
|
strcpy(ptr, str);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user