]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Remove non null 'vm' check from qemuMonitorOpen
authorJohn Ferlan <jferlan@redhat.com>
Tue, 21 Mar 2017 17:37:05 +0000 (13:37 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 22 Mar 2017 17:49:59 +0000 (13:49 -0400)
The prototype requires not passing a NULL in the parameter and the callers
all would fail far before this code would fail if 'vm' was NULL, so just
remove the check.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_monitor.c

index 79da4723784841618117dacd2598bc831710ae13..8218029d007a94944dbcaeb8dcd231639113c805 100644 (file)
@@ -910,8 +910,7 @@ qemuMonitorOpen(virDomainObjPtr vm,
     case VIR_DOMAIN_CHR_TYPE_UNIX:
         hasSendFD = true;
         if ((fd = qemuMonitorOpenUnix(config->data.nix.path,
-                                      vm ? vm->pid : 0,
-                                      timeout)) < 0)
+                                      vm->pid, timeout)) < 0)
             return NULL;
         break;