int memcmp

int memcmp(const void *, const void *, size_t) __ATTR_PURE__

The memcmp() function compares the first len bytes of the memory areas s1 and s2. The comparision is performed using unsigned char operations.


The memcmp() function returns an integer less than, equal to, or greater than zero if the first len bytes of s1 is found, respectively, to be less than, to match, or be greater than the first len bytes of s2.


Be sure to store the result in a 16 bit variable since you may get incorrect results if you use an unsigned char or char due to truncation.


This function is not -mint8 compatible, although if you only care about testing for equality, this function should be safe to use.