[libvirt] [PATCH 1/1] Clean redundant code about VCPU string checking

Li Zhang zhlcindy at gmail.com
Mon Mar 18 09:57:14 UTC 2013


From: Li Zhang <zhlcindy at linux.vnet.ibm.com>

Now that VCPU number are removed from qemu_monitor_text.c.
VCPU string checking also should be removed.

Report-by: John Ferlan <jferlan at redhat.com>
Signed-off-by: Li Zhang <zhlcindy at linux.vnet.ibm.com>
---
 src/qemu/qemu_monitor_text.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 1b6efba..3a0c55f 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -527,17 +527,10 @@ int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
      */
     line = qemucpus;
     do {
-        char *offset = strchr(line, '#');
+        char *offset = NULL;
         char *end = NULL;
         int tid = 0;
 
-        /* See if we're all done */
-        if (offset == NULL)
-            break;
-
-        if (end == NULL || *end != ':')
-            goto error;
-
         /* Extract host Thread ID */
         if ((offset = strstr(line, "thread_id=")) == NULL)
             goto error;
-- 
1.7.10.1




More information about the libvir-list mailing list