diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-09-01 21:07:54 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-09-01 21:07:54 +0200 |
commit | ac044784a6ce64ff15610d4b70750065a7f01b80 (patch) | |
tree | 8ac8629c0089099f21be9107a5d3779963d33ca0 /src/string/memccpy.c | |
parent | add memfrob (diff) | |
download | slibc-ac044784a6ce64ff15610d4b70750065a7f01b80.tar.gz slibc-ac044784a6ce64ff15610d4b70750065a7f01b80.tar.bz2 slibc-ac044784a6ce64ff15610d4b70750065a7f01b80.tar.xz |
start on makefile and fixing warnings and errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/string/memccpy.c')
-rw-r--r-- | src/string/memccpy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/string/memccpy.c b/src/string/memccpy.c index 85378d9..4212419 100644 --- a/src/string/memccpy.c +++ b/src/string/memccpy.c @@ -35,10 +35,10 @@ */ void* memccpy(void* restrict whither, const void* restrict whence, int c, size_t size) { - char_t* stop = memchr(whence, c, size); - void* r = NULL + char* stop = memchr(whence, c, size); + void* r = NULL; if (stop != NULL) - size = (size_t)(stop - whence), r = whither + size; + size = (size_t)(stop - (const char*)whence), r = whither + size; memcpy(whither, whence, size); return r; } @@ -62,10 +62,10 @@ void* memccpy(void* restrict whither, const void* restrict whence, int c, size_t */ void* memcmove(void* whither, const void* whence, int c, size_t size) { - char_t* stop = memchr(whence, c, size); - void* r = NULL + char* stop = memchr(whence, c, size); + void* r = NULL; if (stop != NULL) - size = (size_t)(stop - whence), r = whither + size; + size = (size_t)(stop - (const char*)whence), r = whither + size; memmove(whither, whence, size); return r; } |