Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
a6b25333
Commit
a6b25333
authored
Dec 14, 2016
by
danh-arm
Committed by
GitHub
Dec 14, 2016
Browse files
Merge pull request #776 from dp-arm/dp/memcmp-fix
stdlib: Fix signedness issue in memcmp()
parents
9509f4f6
afc03aeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/stdlib/mem.c
View file @
a6b25333
...
...
@@ -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
d
c
;
char
s
c
;
const
unsigned
char
*
s
=
s1
;
const
unsigned
char
*
d
=
s2
;
unsigned
char
s
c
;
unsigned
char
d
c
;
while
(
len
--
)
{
sc
=
*
s
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment