summaryrefslogtreecommitdiff
path: root/zap/src/strcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'zap/src/strcpy.c')
-rw-r--r--zap/src/strcpy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/zap/src/strcpy.c b/zap/src/strcpy.c
index 943cb2c..616af7f 100644
--- a/zap/src/strcpy.c
+++ b/zap/src/strcpy.c
@@ -6,9 +6,11 @@
#include <zap/priv.h>
+#include <zap/mem.h>
+
#include <stddef.h>
-#if defined(zap_priv_fastimpl)
+#if zap_priv_fastimpl
__asm__ (
".globl zap_strcpy\n"
@@ -62,7 +64,7 @@ size_t zap_strcpy(char const * const _in,char * const _out) {
for (;;++inpos,++outpos) {
char const chr = *inpos;
*outpos = chr;
- if (chr == '\x0') {return (size_t)(inpos - _in);}
+ if (chr == '\x0') {return inpos - _in;}
}
sus_unreach();
}