
On 12/03/2014 02:45 PM, Martin Kletzander wrote:
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@redhat.com> --- 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;
The test fails after this change, because the options added by commit d506a51aeb2a7a7b0c963f760e32b94376ea7173 qemu: Add bps_max and friends qemu driver aren't filled in by the above qemuMonitorJSONSetBlockIoThrottle call. Jan