blob: 7ddbf741a58051b70559e2d2722bdf6af1fe6148 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
#include <kernel/lib/string.h>
#include <kernel/memory/kheap.h>
char *strdup(const char *orig)
{
size_t s_orig = strlen(orig);
char *ret = (char *) kmalloc(s_orig + 1);
strcpy(ret, orig);
return ret;
}
|