summaryrefslogtreecommitdiff
path: root/rushs/tinyprintf/my_memset/my_memset.c
diff options
context:
space:
mode:
Diffstat (limited to 'rushs/tinyprintf/my_memset/my_memset.c')
-rw-r--r--rushs/tinyprintf/my_memset/my_memset.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/rushs/tinyprintf/my_memset/my_memset.c b/rushs/tinyprintf/my_memset/my_memset.c
new file mode 100644
index 0000000..243a5ac
--- /dev/null
+++ b/rushs/tinyprintf/my_memset/my_memset.c
@@ -0,0 +1,12 @@
+#include "my_memset.h"
+
+void *my_memset(void *s, int c, size_t n)
+{
+ unsigned char *t = s;
+ for (size_t i = 0; i < n; i++)
+ {
+ t[i] = c;
+ }
+
+ return t;
+}