Skip to contentSkip to conversation

host-utils: Prefer 'false' for bool type

PATCH Applied Eric Blake 2 participants 2 messages May 31, 2016 – Jun 1, 2016

lore
Share & tools
lore

Eric Blake

author
#0 lore raw

PATCH 1/1 host-utils: Prefer 'false' for bool type

Mixing '0' and 'bool' looks stupid.

---
 include/qemu/host-utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/qemu/host-utils.h +1 -1
index 1cdae0d..3de7d4e 100644
@@ -486,7 +486,7 @@ static inline uint64_t revbit64(uint64_t x)
 static inline bool is_power_of_2(uint64_t value)
 {
     if (!value) {
-        return 0;
+        return false;
     }
 
     return !(value & (value - 1));
Signature · 1 line
2.5.5
#1 lore raw
Quoted 1 line · Eric Blake

Mixing '0' and 'bool' looks stupid.

Applied to -trivial, thanks!

/mjt