aboutsummaryrefslogtreecommitdiff
path: root/src/mlibc/string/strdup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mlibc/string/strdup.c')
-rw-r--r--src/mlibc/string/strdup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mlibc/string/strdup.c b/src/mlibc/string/strdup.c
index 0cddd79..0aa36f7 100644
--- a/src/mlibc/string/strdup.c
+++ b/src/mlibc/string/strdup.c
@@ -1,7 +1,8 @@
#include <mlibc/string.h>
#include <mlibc/stdlib.h>
-char *strdup(const char *orig) {
+char *strdup(const char *orig)
+{
size_t s_orig = strlen(orig);
char *ret = kmalloc(s_orig + 1);
strcpy(ret, orig);