From: John Ferlan Date: Tue, 21 Mar 2017 17:37:05 +0000 (-0400) Subject: qemu: Remove non null 'vm' check from qemuMonitorOpen X-Git-Tag: v3.2.0-rc1~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f9703e094f1398cc1cf137d829c2886666f515d;p=thirdparty%2Flibvirt.git qemu: Remove non null 'vm' check from qemuMonitorOpen 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 --- diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 79da472378..8218029d00 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -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;