aboutsummaryrefslogtreecommitdiff
path: root/lib/libk/stdlib/memset.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libk/stdlib/memset.c')
-rw-r--r--lib/libk/stdlib/memset.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libk/stdlib/memset.c b/lib/libk/stdlib/memset.c
new file mode 100644
index 0000000..a16bd05
--- /dev/null
+++ b/lib/libk/stdlib/memset.c
@@ -0,0 +1,7 @@
+void *
+memset(void *s, int c, long unsigned n)
+{
+ char *pDest = (char *)s;
+ for (unsigned i = 0; i < n; ++i) pDest[i] = (char)c;
+ return s;
+}