diff options
Diffstat (limited to 'system/lib/libc/musl/src/string/memcmp.c')
-rw-r--r-- | system/lib/libc/musl/src/string/memcmp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/system/lib/libc/musl/src/string/memcmp.c b/system/lib/libc/musl/src/string/memcmp.c new file mode 100644 index 00000000..bdbce9f0 --- /dev/null +++ b/system/lib/libc/musl/src/string/memcmp.c @@ -0,0 +1,8 @@ +#include <string.h> + +int memcmp(const void *vl, const void *vr, size_t n) +{ + const unsigned char *l=vl, *r=vr; + for (; n && *l == *r; n--, l++, r++); + return n ? *l-*r : 0; +} |