[kvm-unit-tests PATCH] s390x: Fix selftest malloc check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit c09c54c ("lib: use an argument which doesn't require default
argument promotion") broke the selftest. Let's fix it by converting
the binary operations to bool.

Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
---
 s390x/selftest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/s390x/selftest.c b/s390x/selftest.c
index f4acdc4..9cd6943 100644
--- a/s390x/selftest.c
+++ b/s390x/selftest.c
@@ -49,9 +49,9 @@ static void test_malloc(void)
 	*tmp2 = 123456789;
 	mb();
 
-	report("malloc: got vaddr", (uintptr_t)tmp & 0xf000000000000000ul);
+	report("malloc: got vaddr", !!((uintptr_t)tmp & 0xf000000000000000ul));
 	report("malloc: access works", *tmp == 123456789);
-	report("malloc: got 2nd vaddr", (uintptr_t)tmp2 & 0xf000000000000000ul);
+	report("malloc: got 2nd vaddr", !!((uintptr_t)tmp2 & 0xf000000000000000ul));
 	report("malloc: access works", (*tmp2 == 123456789));
 	report("malloc: addresses differ", tmp != tmp2);
 
-- 
2.20.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux