aboutsummaryrefslogtreecommitdiffstats
path: root/src/string/memccpy.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-09-01 21:07:54 +0200
committerMattias Andrée <maandree@operamail.com>2015-09-01 21:07:54 +0200
commitac044784a6ce64ff15610d4b70750065a7f01b80 (patch)
tree8ac8629c0089099f21be9107a5d3779963d33ca0 /src/string/memccpy.c
parentadd memfrob (diff)
downloadslibc-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.c12
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;
}