diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2010-03-24 15:14:29 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2010-03-24 15:14:29 -0700 |
commit | 3ab6b6d91ff29065145d3cd95d8e71483e518bed (patch) | |
tree | ef7498af7bb8834542d3793089527a09aad0a635 | |
parent | bea2ba0753a80abf0c81a30aff82a701aed4ce9f (diff) | |
parent | 48b40fefa1cd8b5371cb468dfcd79369a137566f (diff) | |
download | extras-3ab6b6d91ff29065145d3cd95d8e71483e518bed.tar.gz |
merge from open-source master
Change-Id: I53bb11e377bf04e9a0a75ce6bb0c1c4afe3faaeb
-rw-r--r-- | tests/memtest/memtest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/memtest/memtest.cpp b/tests/memtest/memtest.cpp index 610421e6..8bdfb4f0 100644 --- a/tests/memtest/memtest.cpp +++ b/tests/memtest/memtest.cpp @@ -381,7 +381,7 @@ static int ref_memcmp(const void *s1, const void *s2, size_t n) break; } - return d; + return (d < 0 ? -1 : (d > 0 ? 1 : 0)); } int validate_memcmp(const char* s, const char* d, size_t size) @@ -389,6 +389,7 @@ int validate_memcmp(const char* s, const char* d, size_t size) int a = ref_memcmp(s, d, size); int b = memcmp(s, d, size); + b = (b < 0 ? -1 : (b > 0 ? 1 : 0)); //printf("%d, %d\n", a, b); if (a != b) { printf("*** memcmp(%p,%p,%lu) failed %d should be %d\n",s,d,size,b,a); |