projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ca23ed
)
efi_selftest: efi_st_memcmp return difference of bytes
author
Heinrich Schuchardt
<
[email protected]
>
Fri, 6 Oct 2017 18:39:13 +0000
(20:39 +0200)
committer
Alexander Graf
<
[email protected]
>
Mon, 9 Oct 2017 05:00:36 +0000
(07:00 +0200)
If the memory regions are different efi_st_memcmp currently
returns the difference of the addresses. Insted the
difference of the first differing byte pair should be
returned.
Signed-off-by: Heinrich Schuchardt <
[email protected]
>
Signed-off-by: Alexander Graf <
[email protected]
>
lib/efi_selftest/efi_selftest_util.c
patch
|
blob
|
history
diff --git
a/lib/efi_selftest/efi_selftest_util.c
b/lib/efi_selftest/efi_selftest_util.c
index c9c295e2fbebed158d7a9ad4e857b8d7baf9db3c..5cffe383d8d317190581c09ae73390895ee1da2e 100644
(file)
--- a/
lib/efi_selftest/efi_selftest_util.c
+++ b/
lib/efi_selftest/efi_selftest_util.c
@@
-17,7
+17,7
@@
int efi_st_memcmp(const void *buf1, const void *buf2, size_t length)
for (; length; --length) {
if (*pos1 != *pos2)
- return
pos1 -
pos2;
+ return
*pos1 - *
pos2;
++pos1;
++pos2;
}