Commit a6b25333 authored by danh-arm's avatar danh-arm Committed by GitHub
Browse files

Merge pull request #776 from dp-arm/dp/memcmp-fix

stdlib: Fix signedness issue in memcmp()
parents 9509f4f6 afc03aeb
......@@ -48,10 +48,10 @@ void *memset(void *dst, int val, size_t count)
*/
int memcmp(const void *s1, const void *s2, size_t len)
{
const char *s = s1;
const char *d = s2;
char dc;
char sc;
const unsigned char *s = s1;
const unsigned char *d = s2;
unsigned char sc;
unsigned char dc;
while (len--) {
sc = *s++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment