[PATCH] tests: Fix misplaced parenthesis in qemumonitorjsontest

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

 



When trying clang, it found out that we were comparing sizeof with 0
even though we wanted to check the return value of memcmp.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 tests/qemumonitorjsontest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 5bfcd20..d3ae29a 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -1879,7 +1879,7 @@ testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle(const void *data)
                                           "drive-virtio-disk0", &info, false) < 0)
         goto cleanup;

-    if (memcmp(&info, &expectedInfo, sizeof(info) != 0)) {
+    if (memcmp(&info, &expectedInfo, sizeof(info)) != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                        "Invalid @info");
         goto cleanup;
-- 
2.1.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]