malloc: fix an over-allocation bug
[musl] / src / string / memccpy.c
index 2ccb31b..7c233d5 100644 (file)
@@ -1,5 +1,4 @@
 #include <string.h>
-#include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
 
@@ -8,7 +7,7 @@
 #define HIGHS (ONES * (UCHAR_MAX/2+1))
 #define HASZERO(x) ((x)-ONES & ~(x) & HIGHS)
 
-void *memccpy(void *dest, const void *src, int c, size_t n)
+void *memccpy(void *restrict dest, const void *restrict src, int c, size_t n)
 {
        unsigned char *d = dest;
        const unsigned char *s = src;