commit | b73d296d747663ecd31caf30ddcebf4a99f39abf | [log] [tgz] |
---|---|---|
author | John Tsichritzis <john.tsichritzis@arm.com> | Thu Jun 20 12:15:31 2019 +0000 |
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | Thu Jun 20 12:15:31 2019 +0000 |
tree | 7e28c8514d5930b6177b7b0edd2e0e75cee90e43 | |
parent | f56734fead96ae3217e767cce037278cf88a602f [diff] | |
parent | 294062fabf885c78d46e3c6e51963d5791b815b2 [diff] |
Merge "libc: fix memchr implementation" into integration
diff --git a/lib/libc/memchr.c b/lib/libc/memchr.c index 0fe0535..8cbb715 100644 --- a/lib/libc/memchr.c +++ b/lib/libc/memchr.c
@@ -9,10 +9,10 @@ void *memchr(const void *src, int c, size_t len) { - const char *s = src; + const unsigned char *s = src; while (len--) { - if (*s == c) + if (*s == (unsigned char)c) return (void *) s; s++; }