mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-25 10:45:02 +00:00
vboot: use vb2_safe_memcmp instead of SafeMemcmp
No need to have two implementations of this now. BUG=chromium:611535 BRANCH=none TEST=make runtests; emerge-kevin coreboot depthcharge Change-Id: I18bac928eb09971c37f3e1d7cbfd2009999b1f31 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/400899 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
This commit is contained in:
@@ -46,18 +46,6 @@
|
||||
/* Return the minimum of (a) or (b). */
|
||||
#define Min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
/**
|
||||
* Compare [n] bytes starting at [s1] with [s2] and return 0 if they
|
||||
* match, 1 if they don't. Returns 0 if n=0, since no bytes mismatched.
|
||||
*
|
||||
* Time taken to perform the comparison is only dependent on [n] and
|
||||
* not on the relationship of the match between [s1] and [s2].
|
||||
*
|
||||
* Note that unlike memcmp(), this only indicates inequality, not
|
||||
* whether s1 is less than or greater than s2.
|
||||
*/
|
||||
int SafeMemcmp(const void *s1, const void *s2, size_t n);
|
||||
|
||||
/*
|
||||
* Buffer size required to hold the longest possible output of Uint64ToString()
|
||||
* - that is, Uint64ToString(~0, 2).
|
||||
|
||||
Reference in New Issue
Block a user