From nobody Tue Feb 10 02:49:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1674677825; cv=none; d=zohomail.com; s=zohoarc; b=l5vITMFdfz2oymeWjS+4ld/z2bqFeW2QHyV/kkDkZOmo+XoS/2Oy1MuUH8F3kLhlYkTTlXUkrvAAGPtW0gZGrGafJtp71QtVoITAD7KePuJybBoHJXQDDxxnVA4OFrYWvbQh4EgLV4mdndVLv9e8nDzuhtz5JAX+4LcEG9NW9KY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674677825; h=Content-Type:Content-Transfer-Encoding:Cc: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=5FRkkHHFAagDo83ZvZshKywhsoSo65h0wAol3tSuiPE=; b=lCEnJH3MhTMmdh+2YJs3J/RjQFmCI75eotycruJeTgvpmqLDfKvSRrKp7ER1FtoqYfigzY/dz5uvn7wS/VmFUYf+9zllXWvxJNSl4koA+8iIDhbgmx+zGkfkBDVL9ojJnDvPNuGJikE4ICM46gWF1TfQlLgAL7uoTKD+YTS45yg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1674677825078694.4364431884982; Wed, 25 Jan 2023 12:17:05 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-360-wHW3UxjYOGq-LHUQIKOsJA-1; Wed, 25 Jan 2023 15:16:16 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8B976857F4D; Wed, 25 Jan 2023 20:16:11 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 745A72026D2A; Wed, 25 Jan 2023 20:16:11 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 250001946A4E; Wed, 25 Jan 2023 20:16:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 45C43194658C for ; Wed, 25 Jan 2023 20:16:08 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 28DC0492B02; Wed, 25 Jan 2023 20:16:08 +0000 (UTC) Received: from himantopus.redhat.com (unknown [10.22.18.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0037D492B01; Wed, 25 Jan 2023 20:16:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674677823; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=5FRkkHHFAagDo83ZvZshKywhsoSo65h0wAol3tSuiPE=; b=DiXiMS5oKcaOd9X+E1qzq/zoVL9+l/p3UIpEvpRSK93dXlPcqghQjjIsnHu8p0iekw+Wsv 4GrgHPs3j+27dxVeWDgSvEkz24n6rN8OpXggF9+vVyvapQVft/q/eH6WgQ2pwef12hT2Ww iIFJ5MqZmXnZ4Mpl+dyS97R1oHMDME0= X-MC-Unique: wHW3UxjYOGq-LHUQIKOsJA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH v6 1/8] conf: explicitly set VIR_DOMAIN_VIDEO_TYPE_DEFAULT to 0 Date: Wed, 25 Jan 2023 14:16:00 -0600 Message-Id: <20230125201607.1378203-2-jjongsma@redhat.com> In-Reply-To: <20230125201607.1378203-1-jjongsma@redhat.com> References: <20230125201607.1378203-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jtomko@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1674677826153100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Ensure that new virDomainVideoDef objects have their 'type' set to VIR_DOMAIN_VIDEO_TYPE_DEFAULT and remove places that this value is set after construction. Since virDomainVideoDefNew() uses g_new0() allocate the instance, all fields are initialized to 0. Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 3 --- src/conf/domain_conf.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 89672deb38..42d2f2ed52 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -12871,8 +12871,6 @@ virDomainVideoDefParseXML(virDomainXMLOption *xmlop= t, _("unknown video model '%s'"), type); return NULL; } - } else { - def->type =3D VIR_DOMAIN_VIDEO_TYPE_DEFAULT; } =20 if ((ram =3D virXPathString("string(./model/@ram)", ctxt))) { @@ -21708,7 +21706,6 @@ virDomainDefAddImplicitVideo(virDomainDef *def, vir= DomainXMLOption *xmlopt) =20 if (!(video =3D virDomainVideoDefNew(xmlopt))) return -1; - video->type =3D VIR_DOMAIN_VIDEO_TYPE_DEFAULT; VIR_APPEND_ELEMENT(def->videos, def->nvideos, video); =20 return 0; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index d99bbbc3ff..e35923e3d7 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1781,7 +1781,7 @@ typedef enum { =20 =20 typedef enum { - VIR_DOMAIN_VIDEO_TYPE_DEFAULT, + VIR_DOMAIN_VIDEO_TYPE_DEFAULT =3D 0, VIR_DOMAIN_VIDEO_TYPE_VGA, VIR_DOMAIN_VIDEO_TYPE_CIRRUS, VIR_DOMAIN_VIDEO_TYPE_VMVGA, --=20 2.39.0