]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Fix name comparison in qemuMonitorJSONBlockIoThrottleInfo()
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 1 Nov 2012 17:20:56 +0000 (18:20 +0100)
committerEric Blake <eblake@redhat.com>
Thu, 1 Nov 2012 19:23:27 +0000 (13:23 -0600)
The string comparison logic was inverted and matched the first drive
that does *not* have the name we search for.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
src/qemu/qemu_monitor_json.c

index af1227760ff0b7810683b87da66ef2dd8429c9d1..8a31466e17dd8894e139ef4af8c829774de1bb87 100644 (file)
@@ -3739,7 +3739,7 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr result,
             goto cleanup;
         }
 
-        if (STREQ(current_dev, device))
+        if (STRNEQ(current_dev, device))
             continue;
 
         found = true;