summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/string.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/string.h b/src/include/string.h
index 708961b635..44f244c733 100644
--- a/src/include/string.h
+++ b/src/include/string.h
@@ -69,10 +69,15 @@ static inline char *strncpy(char *to, const char *from, int count)
return ret;
}
-static inline void strcpy(char *dst, const char *src)
+static inline char *strcpy(char *dst, const char *src)
{
+ char *ptr = dst;
+
while (*src)
*dst++ = *src++;
+ *dst = '\0';
+
+ return ptr;
}
static inline int strcmp(const char *s1, const char *s2)