summaryrefslogtreecommitdiff
path: root/rushs/tinyprintf/my_memmove/my_memmove.c
diff options
context:
space:
mode:
Diffstat (limited to 'rushs/tinyprintf/my_memmove/my_memmove.c')
-rw-r--r--rushs/tinyprintf/my_memmove/my_memmove.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/rushs/tinyprintf/my_memmove/my_memmove.c b/rushs/tinyprintf/my_memmove/my_memmove.c
deleted file mode 100644
index bb360a5..0000000
--- a/rushs/tinyprintf/my_memmove/my_memmove.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "my_memmove.h"
-
-void *my_memmove(void *dest, const void *src, size_t n)
-{
- char *d = dest;
- const char *s = src;
- if (dest > src) // reverse array
- {
- size_t l = n;
- for (; l > 0; l--)
- {
- d[l - 1] = s[l - 1];
- }
- }
- else
- {
- for (size_t i = 0; i < n; i++)
- {
- d[i] = s[i];
- }
- }
- return dest;
-}