mirror of
https://github.com/UzixLS/KernelEx.git
synced 2025-07-19 07:21:20 +03:00
import KernelEx-4.0-RC1
This commit is contained in:
19
kexcrt/memcmp.c
Normal file
19
kexcrt/memcmp.c
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* memcmp.c
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
int memcmp(const void *s1, const void *s2, size_t n)
|
||||
{
|
||||
const unsigned char *c1 = s1, *c2 = s2;
|
||||
int d = 0;
|
||||
|
||||
while (n--) {
|
||||
d = (int)*c1++ - (int)*c2++;
|
||||
if (d)
|
||||
break;
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
Reference in New Issue
Block a user