diff options
author | Mattias Andrée <maandree@kth.se> | 2018-05-17 07:21:50 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2018-05-17 07:21:50 +0200 |
commit | e93bafcb11bf97934840d67c9bca3930473458f6 (patch) | |
tree | 3ecaca70e4ca7f83ad337005ddf203f3030065a8 /src/string/mem/memcmp.c | |
parent | m (diff) | |
download | slibc-e93bafcb11bf97934840d67c9bca3930473458f6.tar.gz slibc-e93bafcb11bf97934840d67c9bca3930473458f6.tar.bz2 slibc-e93bafcb11bf97934840d67c9bca3930473458f6.tar.xz |
memcmp: compare unsigned chars
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | src/string/mem/memcmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string/mem/memcmp.c b/src/string/mem/memcmp.c index 71a3cd1..3f32762 100644 --- a/src/string/mem/memcmp.c +++ b/src/string/mem/memcmp.c @@ -32,8 +32,8 @@ */ int memcmp(const void* a, const void* b, size_t size) { - const signed char* s1 = a; - const signed char* s2 = b; + const unsigned char* s1 = a; + const unsigned char* s2 = b; while (size--) if (*s1 == *s2) s1++, s2++; |