summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-04-26 12:28:41 -0400
committerRich Felker <dalias@aerifal.cx>2011-04-26 12:28:41 -0400
commitb5b41212a686849fe061b8c4bb80d38f893d00c7 (patch)
treee2a982286967f3dbaca3b9b0dcc56992bf6bf89b
parent32e2c468baac683114efdf836632aa948872b5ce (diff)
downloadmusl-b5b41212a686849fe061b8c4bb80d38f893d00c7.tar.gz
musl-b5b41212a686849fe061b8c4bb80d38f893d00c7.tar.bz2
musl-b5b41212a686849fe061b8c4bb80d38f893d00c7.tar.xz
musl-b5b41212a686849fe061b8c4bb80d38f893d00c7.zip
function signature fix: add const qualifier to mempcpy src arg
-rw-r--r--include/string.h2
-rw-r--r--src/string/mempcpy.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/string.h b/include/string.h
index 94188bc0..f95a15c9 100644
--- a/include/string.h
+++ b/include/string.h
@@ -75,7 +75,7 @@ char *strchrnul(const char *, int);
char *strcasestr(const char *, const char *);
char *strsep(char **, const char *);
void *memrchr(const void *, int, size_t);
-void *mempcpy(void *, void *, size_t);
+void *mempcpy(void *, const void *, size_t);
#endif
#ifdef __cplusplus
diff --git a/src/string/mempcpy.c b/src/string/mempcpy.c
index e54251cd..1b323f1e 100644
--- a/src/string/mempcpy.c
+++ b/src/string/mempcpy.c
@@ -1,6 +1,6 @@
#include <string.h>
-void *mempcpy(void *dest, void *src, size_t n)
+void *mempcpy(void *dest, const void *src, size_t n)
{
memcpy(dest, src, n);
return (char *)dest + n;