mirror of
https://github.com/UzixLS/KernelEx.git
synced 2025-07-19 07:21:20 +03:00
import KernelEx-4.5-RC1
This commit is contained in:
16
kexcrt/strdup.c
Executable file
16
kexcrt/strdup.c
Executable file
@ -0,0 +1,16 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
char *strdup(const char *str)
|
||||
{
|
||||
char *newstr;
|
||||
|
||||
if (!str)
|
||||
return NULL;
|
||||
|
||||
newstr = (char *) malloc(strlen(str) + 1);
|
||||
if (newstr)
|
||||
strcpy(newstr, str);
|
||||
|
||||
return newstr;
|
||||
}
|
Reference in New Issue
Block a user