aboutsummaryrefslogtreecommitdiffstats
path: root/src/string/memcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string/memcpy.c')
-rw-r--r--src/string/memcpy.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/string/memcpy.c b/src/string/memcpy.c
index 54482fb..fcda29d 100644
--- a/src/string/memcpy.c
+++ b/src/string/memcpy.c
@@ -18,9 +18,6 @@
#include <string.h>
-# pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
-
-
/**
* Copy a memory segment to another, non-overlapping, segment.
@@ -33,25 +30,9 @@
void* memcpy(void* restrict whither, const void* restrict whence, size_t size)
{
char* d = whither;
- char* s = whence;
+ const char* s = whence;
while (size--)
*d++ = *s++;
return whither;
}
-
-/**
- * Copy a memory segment to another, non-overlapping, segment.
- *
- * This is a GNU extension.
- *
- * @param whither The destination memory segment.
- * @param whence The source memory segment.
- * @param size The number of bytes to copy.
- * @return `whither + size` is returned.
- */
-void* mempcpy(void* restrict whither, const void* restrict whence, size_t size)
-{
- return (char*)memcpy(whither, whence, size) + size;
-}
-