From nobody Mon Feb 9 09:08:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1574694131; cv=none; d=zohomail.com; s=zohoarc; b=lQl+aRrk/dEVcGU8eNKo81BuMW61X8H4GIA9+Menbd3HeNz8ewcnL3b7nBYev2uOTlhuLDpdEoF/a4zeUxfAuTXRvuHZgK/boV/4EzhpaAwbrossa+65l+jcRJm9eF05UWTasMakSZXqhdd/w7e3lcvRL6qIZu4m7mhBAsTy8G0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574694131; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BWf5DC9bQnZO1jaf/gwZ377tvAaYsdwdeKR2ymvYqPo=; b=PhEmvT6utvWTLeuVIpmoi1xalzPBI4I+V8FCAhrvYStuFieLMyfyT/vCvA/EpoS5C1LAtwVlvpXkmoYg/BwaGIEzIOddtohmokMtnVLfF52bFX2SQd+exTiBQjNj4ePhNuSC/fQc+TQzqZ/KvD4Yg41cFJGCzYiI0A8BaROz0kU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1574694131440190.86920807302715; Mon, 25 Nov 2019 07:02:11 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-16-HYq92xvBMrutKMZKOP5Y6A-1; Mon, 25 Nov 2019 10:02:08 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C315A100FB94; Mon, 25 Nov 2019 15:01:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 936E960C18; Mon, 25 Nov 2019 15:01:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 06754182B013; Mon, 25 Nov 2019 15:01:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPF1pTD022057 for ; Mon, 25 Nov 2019 10:01:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id 965E55D6AE; Mon, 25 Nov 2019 15:01:51 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1841F5D6A0 for ; Mon, 25 Nov 2019 15:01:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574694130; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=BWf5DC9bQnZO1jaf/gwZ377tvAaYsdwdeKR2ymvYqPo=; b=NH+4Z4xbWXU08tQGRgNMN19v4o+NdWyGYmXE9fFL0c+9jfDE/agMtYL5hNhKinRMqrWGa0 aBlI+8kO+tpMKRBmYhdqUHzsFxfbXK8cvsdBeXPpkEF+9Z+UYNsSQGW4+Eg5NVJ0cqYGzs 555wxWanONdVutDJ7uw32dtGfy+SdcE= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 16:01:36 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 9/9] qemu: Always reset @info in qemuDomainGetJobInfo 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: HYq92xvBMrutKMZKOP5Y6A-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" qemuDomainGetJobInfo didn't always reset the return data in @info. Thankfully this wouldn't be a problem as the RPC layer does it but we should do it anyways. Since we reset the struct we don't have to set the type to VIR_DOMAIN_JOB_NONE is as the value is 0. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/qemu/qemu_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 5d6a82bc13..112d7a6861 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13920,6 +13920,8 @@ qemuDomainGetJobInfo(virDomainPtr dom, virDomainObjPtr vm; int ret =3D -1; + memset(info, 0, sizeof(*info)); + if (!(vm =3D qemuDomainObjFromDomain(dom))) goto cleanup; @@ -13930,8 +13932,6 @@ qemuDomainGetJobInfo(virDomainPtr dom, goto cleanup; if (jobInfo.status =3D=3D QEMU_DOMAIN_JOB_STATUS_NONE) { - memset(info, 0, sizeof(*info)); - info->type =3D VIR_DOMAIN_JOB_NONE; ret =3D 0; goto cleanup; } --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list