summaryrefslogtreecommitdiff
path: root/src/libstddjb/byte_zero.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/byte_zero.c')
-rw-r--r--src/libstddjb/byte_zero.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libstddjb/byte_zero.c b/src/libstddjb/byte_zero.c
new file mode 100644
index 0000000..6751210
--- /dev/null
+++ b/src/libstddjb/byte_zero.c
@@ -0,0 +1,15 @@
+/* ISC license. */
+
+#include <skalibs/config.h>
+
+#ifdef SKALIBS_FLAG_REPLACE_LIBC
+
+#include <skalibs/bytestr.h>
+
+void byte_zero (void *p, register unsigned int n)
+{
+ register char *s = (char *)p ;
+ while (n--) *s++ = 0 ;
+}
+
+#endif