From patchwork Fri Apr 15 12:54:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 65909 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1164215qge; Fri, 15 Apr 2016 05:57:07 -0700 (PDT) X-Received: by 10.141.1.138 with SMTP id c132mr25237516qhd.7.1460725027708; Fri, 15 Apr 2016 05:57:07 -0700 (PDT) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id p75si36374522qha.97.2016.04.15.05.57.06 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 15 Apr 2016 05:57:07 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3FCsQvq019590; Fri, 15 Apr 2016 08:54:27 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3FCsPXx017589 for ; Fri, 15 Apr 2016 08:54:25 -0400 Received: from colepc.redhat.com (ovpn-113-40.phx2.redhat.com [10.3.113.40]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3FCsOe2008699; Fri, 15 Apr 2016 08:54:24 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 15 Apr 2016 08:54:23 -0400 Message-Id: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: Remove redundant DomainObjIsActive check X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com We perform the same check several lines earlier --- src/qemu/qemu_driver.c | 6 ------ 1 file changed, 6 deletions(-) -- 2.7.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e795062..ced808a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -18403,32 +18403,26 @@ qemuDomainQemuAgentCommand(virDomainPtr domain, if (!virDomainObjIsActive(vm)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("domain is not running")); goto cleanup; } if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0) goto cleanup; if (!qemuDomainAgentAvailable(vm, true)) goto endjob; - if (!virDomainObjIsActive(vm)) { - virReportError(VIR_ERR_OPERATION_INVALID, - "%s", _("domain is not running")); - goto endjob; - } - qemuDomainObjEnterAgent(vm); ret = qemuAgentArbitraryCommand(priv->agent, cmd, &result, timeout); qemuDomainObjExitAgent(vm); if (ret < 0) VIR_FREE(result); endjob: qemuDomainObjEndJob(driver, vm); cleanup: virDomainObjEndAPI(&vm); return result; }