From: stewartamiles Date: Fri, 14 Aug 2009 16:15:48 +0000 (+0000) Subject: Fixed memory_not_equal_display_error() to display an error if memory blocks are the... X-Git-Tag: cmocka-1.1.1~363 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d91d1c6d6376ba3a56bcf17205e05b2634a0b865;p=platform%2Fupstream%2Fcmocka.git Fixed memory_not_equal_display_error() to display an error if memory blocks are the same. git-svn-id: http://cmockery.googlecode.com/svn/trunk@41 40f4469a-5155-0410-be90-2de3f0bae501 --- diff --git a/src/cmockery.c b/src/cmockery.c index 5c51b57..e7ad3b1 100755 --- a/src/cmockery.c +++ b/src/cmockery.c @@ -868,11 +868,10 @@ static int memory_not_equal_display_error( const char l = a[i]; const char r = b[i]; if (l == r) { - print_error("equal at offset %d 0x%02x 0x%02x\n", i, l, r); same ++; } } - if (same) { + if (same == size) { print_error("%d bytes of 0x%08x and 0x%08x the same\n", same, a, b); return 0;