[libvirt] [PATCH python] Avoid comparing boolean and integers

Daniel P. Berrange berrange at redhat.com
Wed Aug 9 16:07:19 UTC 2017


Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 libvirt-utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libvirt-utils.c b/libvirt-utils.c
index 727397d..0af13dc 100644
--- a/libvirt-utils.c
+++ b/libvirt-utils.c
@@ -108,7 +108,7 @@ virReallocN(void *ptrptr,
         return -1;
     }
     tmp = realloc(*(void**)ptrptr, size * count);
-    if (!tmp && (size * count)) {
+    if (!tmp && ((size * count) != 0)) {
         return -1;
     }
     *(void**)ptrptr = tmp;
-- 
2.13.3




More information about the libvir-list mailing list