diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2019-06-20 11:57:17 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2019-06-20 11:57:17 +0000 |
commit | 39b397af7566135498e6995102698c0efb0dc90c (patch) | |
tree | ee8e82f936f3008e99b80f97c487d369437f51f8 | |
parent | 11c53c86d4828b12ffa61ce180b0c4e694348ae3 (diff) | |
parent | 8051274dfc4dae689ba53bc3e56d320780cbd5a4 (diff) | |
download | tf-a-tests-39b397af7566135498e6995102698c0efb0dc90c.tar.gz |
Merge "libc: fix memchr implementation"
-rw-r--r-- | lib/libc/memchr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/memchr.c b/lib/libc/memchr.c index 2eba47c95..7bd3a7e30 100644 --- a/lib/libc/memchr.c +++ b/lib/libc/memchr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -8,10 +8,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++; } |