aboutsummaryrefslogtreecommitdiffstats
path: root/src/string/memcpy.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-11-17 03:30:10 +0100
committerMattias Andrée <maandree@operamail.com>2015-11-17 03:30:10 +0100
commit5e57b83aae16d44318b9eed1b2cecd0591adc981 (patch)
treee1cf6290396be7c3251e95606c8a316058ce52a6 /src/string/memcpy.c
parentsplit err.c (diff)
downloadslibc-5e57b83aae16d44318b9eed1b2cecd0591adc981.tar.gz
slibc-5e57b83aae16d44318b9eed1b2cecd0591adc981.tar.bz2
slibc-5e57b83aae16d44318b9eed1b2cecd0591adc981.tar.xz
m + typo + split (almost all) string/*.c
Signed-off-by: Mattias Andrée <maandree@operamail.com>
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;
-}
-