From nobody Wed May 8 00:53:31 2024 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=1625482082; cv=none; d=zohomail.com; s=zohoarc; b=Dr039HCnxPqyWOTGXnoFsJgJb7UlNldiTJWLyIvYrWZqKGRA5nxZeVnun7C54e8Hx0ElOsF3PkZJ4/b4U7cku04QRThSCltZJMyPC8aaNrYtrm5CjeVzrIC6O6b8F9rDiuKwF7TXUr2EdaKA3kjWE8sPSQmidvoWIwx1LeLJPtA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625482082; 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=QsaDjcgLa5ut4WK/WBlQ+QmZRQ9bYhjALq2NFM0YlEA=; b=WLvPXLsDCDEAZPYUEJOdaLBrbHOJlpfWPvmZfJXDwO5GO9Vj84cb7cz2vnQ/GGOYzYs4HDq4gJ/zlQ1YNAveFGoYLyz+xgpYe6dlSEEhVrPGN1ob/nljPPp3PopDZCgJLR7NXDyNjKCt+V8gs9bhX9rYYK5YEbD5ZZIQe8A2CwQ= 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 1625482082804453.3190185394436; Mon, 5 Jul 2021 03:48:02 -0700 (PDT) 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-496-E9fprwY0NDK8xVdq7MHKGg-1; Mon, 05 Jul 2021 06:47:38 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6EDB01084F5C; Mon, 5 Jul 2021 10:47:33 +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 64CD619710; Mon, 5 Jul 2021 10:47:32 +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 7E9D41809C99; Mon, 5 Jul 2021 10:47:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165Al1aG008533 for ; Mon, 5 Jul 2021 06:47:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3E1C760875; Mon, 5 Jul 2021 10:47:01 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 88FFF60864; Mon, 5 Jul 2021 10:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625482081; 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=QsaDjcgLa5ut4WK/WBlQ+QmZRQ9bYhjALq2NFM0YlEA=; b=c/EDlXy5fTsp5QRX2MFGRGVmd3BqFml+0vtwxGWUB3qWc46P5hna2wGUEP7nXxzan/I83q veLtOCUjPvZEp64nMRN6ucdl5C72lYH1NcFl1yh/0Vdd4YkLslRkKcYazn1psZX9zpV94Q iH4s73uWbaXLB7/asSiqpBTxBQO1HjA= X-MC-Unique: E9fprwY0NDK8xVdq7MHKGg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 1/6] conf: Add AUTOPTR_CLEANUP_FUNC for virDomainSEVDef Date: Mon, 5 Jul 2021 12:46:49 +0200 Message-Id: <20210705104654.77483-2-twiederh@redhat.com> In-Reply-To: <20210705104654.77483-1-twiederh@redhat.com> References: <20210705104654.77483-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1625482084636100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 04c10df0a9..c1438d85f4 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3490,7 +3490,7 @@ virDomainResctrlDefFree(virDomainResctrlDef *resctrl) } =20 =20 -static void +void virDomainSEVDefFree(virDomainSEVDef *def) { if (!def) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 4d9d499b16..a14a2090f8 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2661,6 +2661,8 @@ struct _virDomainSEVDef { unsigned int reduced_phys_bits; }; =20 +void virDomainSEVDefFree(virDomainSEVDef *def); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainSEVDef, virDomainSEVDefFree); =20 typedef enum { VIR_DOMAIN_IOMMU_MODEL_INTEL, --=20 2.31.1 From nobody Wed May 8 00:53:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1625482083; cv=none; d=zohomail.com; s=zohoarc; b=U2ajYzjNj0HuI80QPesyf6C6YqD+C6XnPqinHA/pDvhbyRJBwgfNj+SnnlMwZ1DV8qzyclnfdXWVQJ4805vImztjmmr8hg9DxQGk7Lb9zcpuo6Qf8SeZsIhVlqpstSwBs36W89cWPRKBYFSLkYf6v1P5CyXLrJE0xUm0OYudEF0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625482083; 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=K3zKdIeBxB5IGIYaThAtl73kCYk2CyKXFBJvg0+jAMo=; b=A13+1QPW9w0AUpYBr4OG0GAUmquFZh5LTscpnePlwxcQoa5E241Qyq9/hyrVy7yRCsh6y5JA95uCiqSWXLBoMWp+w8YkNs0KjTeOh9M3FGvc9+7NHetfQ2mvJ/fZOIDhJIYrIxdjNJy1QxB0gIP3vFV2OdcV7Fd5w2bbSUZi49k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1625482083654824.5761475360296; Mon, 5 Jul 2021 03:48:03 -0700 (PDT) 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-545-1oCFlAVsNZa7lm_jGr0l4g-1; Mon, 05 Jul 2021 06:47:54 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 700011835AD9; Mon, 5 Jul 2021 10:47:48 +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 423A717A70; Mon, 5 Jul 2021 10:47:48 +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 0F87E1809CB2; Mon, 5 Jul 2021 10:47:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165Al2uw008538 for ; Mon, 5 Jul 2021 06:47:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4358A60875; Mon, 5 Jul 2021 10:47:02 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 92B7D60864; Mon, 5 Jul 2021 10:47:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625482082; 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=K3zKdIeBxB5IGIYaThAtl73kCYk2CyKXFBJvg0+jAMo=; b=ZKd0/456glPAyBF0/BNhxUSf/GMvtxR7xx0UBCx4hynZPr/2BFl5mXrCrSaa82VMnDfNOG 4qu4QGoOmjff53XXEqSrmxcehfFQVSGOypNb7qxSPwyYeMWPSthodwsBB4l2yfxgqxyl1z Ay923JpOCdjZHLY3cB+E1lHvptZyK78= X-MC-Unique: 1oCFlAVsNZa7lm_jGr0l4g-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 2/6] conf: virDomainSEVDef: Change type of "sectype" to virDomainLaunchSecurity Date: Mon, 5 Jul 2021 12:46:50 +0200 Message-Id: <20210705104654.77483-3-twiederh@redhat.com> In-Reply-To: <20210705104654.77483-1-twiederh@redhat.com> References: <20210705104654.77483-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1625482085504100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 6 ++++-- src/conf/domain_conf.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c1438d85f4..68ab18f3ab 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14722,6 +14722,7 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, virDomainSEVDef *def; unsigned long policy; g_autofree char *type =3D NULL; + int sectype; int rc =3D -1; =20 def =3D g_new0(virDomainSEVDef, 1); @@ -14734,8 +14735,8 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, goto error; } =20 - def->sectype =3D virDomainLaunchSecurityTypeFromString(type); - switch ((virDomainLaunchSecurity) def->sectype) { + sectype =3D virDomainLaunchSecurityTypeFromString(type); + switch ((virDomainLaunchSecurity) sectype) { case VIR_DOMAIN_LAUNCH_SECURITY_SEV: break; case VIR_DOMAIN_LAUNCH_SECURITY_NONE: @@ -14746,6 +14747,7 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, type); goto error; } + def->sectype =3D sectype; =20 if (virXPathULongHex("string(./policy)", ctxt, &policy) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index a14a2090f8..c31531c93b 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2651,7 +2651,7 @@ typedef enum { =20 =20 struct _virDomainSEVDef { - int sectype; /* enum virDomainLaunchSecurity */ + virDomainLaunchSecurity sectype; char *dh_cert; char *session; unsigned int policy; --=20 2.31.1 From nobody Wed May 8 00:53:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1625482076; cv=none; d=zohomail.com; s=zohoarc; b=KMWoKqFETHIwOFraeU8lSxzw8vBojGNnc7QPL3TyTFwmL728H24SjzEQ4lIfKjEPJuN0GBWoDW1H1+VKpkFwmYOLd4PaU0dnR9UnKXUXTwVPvCnTNhoOPhE9V640hf3+G4QGmh38mmxKTlpL0c38aTMac2Axn5j1KMRnjGwwEk0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625482076; 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=Pa59eZr84Zjb0WaJz4YZUPXWFDgopBM0jpofZ23IHzA=; b=n5Ynzvz6bU14GE8KuygZOsjRL+N1Gx26Smxaz0apNI0+atYSTrxr9ZyYFfOAm/r5ymVppUo/NBvudHWXIgi2nPcBCsfMn/C2DMIDUcnYwqlYz22UBPCCiEi6UQwNcC+xNxm+3rnj2opsRNFFMB5Z/+nNTdYsmOLK9XKBH5yy/fc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 16254820763831011.4900450644868; Mon, 5 Jul 2021 03:47:56 -0700 (PDT) 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-545-ihLfmawrPDmo61O_BDzqww-1; Mon, 05 Jul 2021 06:47:53 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5C2AD3630C; Mon, 5 Jul 2021 10:47:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3EB6317C58; Mon, 5 Jul 2021 10:47:48 +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 0AC664EA3C; Mon, 5 Jul 2021 10:47:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165Al3uO008543 for ; Mon, 5 Jul 2021 06:47:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4530C60875; Mon, 5 Jul 2021 10:47:03 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9465760864; Mon, 5 Jul 2021 10:47:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625482075; 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=Pa59eZr84Zjb0WaJz4YZUPXWFDgopBM0jpofZ23IHzA=; b=EcuXtHlVLlENIn4vkdde2rZJ7ly1aURC8UdKRSCb18998ZKTdVRayb230Pp9tAhv8YZpee Y90RRvPrsgchOBG3qtLr65cG4piLpz3bmVDuEvou0EFyXVBKt7MTj0f3qVA1Sxth+FVStq v1YELjw/xSXXLH4NCFHNrv8mEiApwM8= X-MC-Unique: ihLfmawrPDmo61O_BDzqww-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 3/6] virDomainSEVDefParseXML: Use virXMLPropEnum Date: Mon, 5 Jul 2021 12:46:51 +0200 Message-Id: <20210705104654.77483-4-twiederh@redhat.com> In-Reply-To: <20210705104654.77483-1-twiederh@redhat.com> References: <20210705104654.77483-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1625482078150100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 68ab18f3ab..dda615a8ba 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14721,33 +14721,16 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, VIR_XPATH_NODE_AUTORESTORE(ctxt) virDomainSEVDef *def; unsigned long policy; - g_autofree char *type =3D NULL; - int sectype; int rc =3D -1; =20 def =3D g_new0(virDomainSEVDef, 1); =20 ctxt->node =3D sevNode; =20 - if (!(type =3D virXMLPropString(sevNode, "type"))) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("missing launch security type")); - goto error; - } - - sectype =3D virDomainLaunchSecurityTypeFromString(type); - switch ((virDomainLaunchSecurity) sectype) { - case VIR_DOMAIN_LAUNCH_SECURITY_SEV: - break; - case VIR_DOMAIN_LAUNCH_SECURITY_NONE: - case VIR_DOMAIN_LAUNCH_SECURITY_LAST: - default: - virReportError(VIR_ERR_XML_ERROR, - _("unsupported launch security type '%s'"), - type); + if (virXMLPropEnum(sevNode, "type", virDomainLaunchSecurityTypeFromStr= ing, + VIR_XML_PROP_NONZERO | VIR_XML_PROP_REQUIRED, + &def->sectype) < 0) goto error; - } - def->sectype =3D sectype; =20 if (virXPathULongHex("string(./policy)", ctxt, &policy) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", --=20 2.31.1 From nobody Wed May 8 00:53:31 2024 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=1625482061; cv=none; d=zohomail.com; s=zohoarc; b=fs/aoNPPrRGSP3/bsf8D7AKtu8OYv3328S7R+vfmjqB//G01aXWAvSkKUmP1VSq4D+zd0MD+X1aH0JkHFmNoED4Jxyw9lFWcoc6VQoHCG490vMl9R8REv5xoU8WyaQwqGOvSna9y2sN4HymTDqxuSe4gRgVJN84LPq9Tc5cVrXA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625482061; 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=r7dh4kktfSV8LxDnkGUl8fansZOK2bwH4PRWR4fQ768=; b=li+VL+n7mwf2/pGhrhROAQvVjkIJCxRiHsuPzSBVShwpc5XplwRqXxGOCzJ5jo1sHq7UX3pv1pSjHEcQZB2EDVaypH8t1BtPSzdOmFckQGQlObxvhEVYyVmeIo2a45Vf1tmiJsYrG2/iDdNHSJykufoNBVVLhOpb8X8m6XinH2M= 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 1625482061571928.9621315105021; Mon, 5 Jul 2021 03:47:41 -0700 (PDT) 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-496-dLhXII9OMiqZ-xcOsE0fMA-1; Mon, 05 Jul 2021 06:47:38 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4607F80292B; Mon, 5 Jul 2021 10:47:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 647F960864; Mon, 5 Jul 2021 10:47:32 +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 7E8B54EA2A; Mon, 5 Jul 2021 10:47:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165Al7CD008549 for ; Mon, 5 Jul 2021 06:47:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2ACB660871; Mon, 5 Jul 2021 10:47:07 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7630A60864; Mon, 5 Jul 2021 10:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625482060; 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=r7dh4kktfSV8LxDnkGUl8fansZOK2bwH4PRWR4fQ768=; b=KfZLmp2u3kNnnBnV+R8EFTaCznmILYjC/wL+xp3nLHkdw2lFOLBm1yJcQZF9mIQ90kFN7g g2nKYY6B6M6IUvtXFKVBQF7ElriOlP8gw9e52qpwAwv6iee1uB8wcNuaYFaxIUlc/ZQMMU Eg4nV9M9rbvYs+/4IJIH+AX+pLxjhaY= X-MC-Unique: dLhXII9OMiqZ-xcOsE0fMA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 4/6] virDomainSEVDefParseXML: Use automatic memory management Date: Mon, 5 Jul 2021 12:46:52 +0200 Message-Id: <20210705104654.77483-5-twiederh@redhat.com> In-Reply-To: <20210705104654.77483-1-twiederh@redhat.com> References: <20210705104654.77483-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1625482063327100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index dda615a8ba..dd803e6df5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14719,7 +14719,7 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, xmlXPathContextPtr ctxt) { VIR_XPATH_NODE_AUTORESTORE(ctxt) - virDomainSEVDef *def; + g_autoptr(virDomainSEVDef) def =3D NULL; unsigned long policy; int rc =3D -1; =20 @@ -14765,10 +14765,9 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, def->dh_cert =3D virXPathString("string(./dhCert)", ctxt); def->session =3D virXPathString("string(./session)", ctxt); =20 - return def; + return g_steal_pointer(&def); =20 error: - virDomainSEVDefFree(def); return NULL; } =20 --=20 2.31.1 From nobody Wed May 8 00:53:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1625482076; cv=none; d=zohomail.com; s=zohoarc; b=F0tRORnxQ+lqH5qS9qCzVEw9KDY6VRdepUExnoQSEyEXuh/i3SQ+a0BUL+CK22a5kwJkT9b0xLIkLYs4fesqt1ZmIZVVdkPfOtfBvrX1AKocA5n94VQfeUC2fSo3drdg3azrHtWPPnEdTbHygiV2yq60dNPBkrzUCY3y9/8bDN8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625482076; 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=CLj/ho+nbRNVibIqS82s09NoF52B/zpjXfOP9QP9xxA=; b=HPgV9Bgbguk+7sNspDRVcEfwgdg8+2sHh47XzDuHguMlA934rUuX+mcUY26HUnVH880mLKm4B0s2gQNnbClYUQxDiH6CtXg2Dy5I2dWIbRbujSYhjmw+nSDNxLTDmoWPkO+tGCJ8Y/cWkvHfDALBbOw/Q9V9uFJl7foe9ULgDl8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1625482076530579.9802357530448; Mon, 5 Jul 2021 03:47:56 -0700 (PDT) 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-519-oSjotX2YNzeCXaM29ybPGA-1; Mon, 05 Jul 2021 06:47:53 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6AA6E3630D; Mon, 5 Jul 2021 10:47:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3FB46102AE7E; Mon, 5 Jul 2021 10:47:48 +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 0BF614EA3D; Mon, 5 Jul 2021 10:47:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165Al8dk008554 for ; Mon, 5 Jul 2021 06:47:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2D4EF60875; Mon, 5 Jul 2021 10:47:08 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7BC0B60864; Mon, 5 Jul 2021 10:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625482075; 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=CLj/ho+nbRNVibIqS82s09NoF52B/zpjXfOP9QP9xxA=; b=daG90RVqLlj1l/fB8Z0sy/tvMBkwWavPl6X4FfcFGjCAU/IXb0JtmaYdrdG5nI4g5J5xCW SLSWb2NgG4hvryiLSJt+Vig7jtdvx1Eo5xAi0BGJPg5KDRSc11VYRn/jc+oat3TouyTumZ ziU2JvsrmVQ7mzZ83FunDU15fZO+QO0= X-MC-Unique: oSjotX2YNzeCXaM29ybPGA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 5/6] virDomainSEVDefParseXML: Remove superfluous `goto`s Date: Mon, 5 Jul 2021 12:46:53 +0200 Message-Id: <20210705104654.77483-6-twiederh@redhat.com> In-Reply-To: <20210705104654.77483-1-twiederh@redhat.com> References: <20210705104654.77483-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1625482078198100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index dd803e6df5..db8ec23d70 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14730,12 +14730,12 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, if (virXMLPropEnum(sevNode, "type", virDomainLaunchSecurityTypeFromStr= ing, VIR_XML_PROP_NONZERO | VIR_XML_PROP_REQUIRED, &def->sectype) < 0) - goto error; + return NULL; =20 if (virXPathULongHex("string(./policy)", ctxt, &policy) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("failed to get launch security policy")); - goto error; + return NULL; } =20 /* the following attributes are platform dependent and if missing, we = can @@ -14747,7 +14747,7 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, } else if (rc =3D=3D -2) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Invalid format for launch security cbitpos")); - goto error; + return NULL; } =20 rc =3D virXPathUInt("string(./reducedPhysBits)", ctxt, @@ -14758,7 +14758,7 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, virReportError(VIR_ERR_XML_ERROR, "%s", _("Invalid format for launch security " "reduced-phys-bits")); - goto error; + return NULL; } =20 def->policy =3D policy; @@ -14766,9 +14766,6 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, def->session =3D virXPathString("string(./session)", ctxt); =20 return g_steal_pointer(&def); - - error: - return NULL; } =20 =20 --=20 2.31.1 From nobody Wed May 8 00:53:31 2024 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=1625482079; cv=none; d=zohomail.com; s=zohoarc; b=aBoVgPPwypO6OMv18tYJHgtKqDZsxAiB6aDUQks07VmfpWx1VIr5DTba0Vo1uUqQpE5CcoubDoDSZvtSlYUuSnztMGXjvoYSZtcXe5pK0cbsYfK9zqvEItI6XK0RGSrt/b2s5E+GlumtV4Xt6l2oP1uw/uCKVkq9kMtZKVLR06A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625482079; 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=Q2WvWVRrWhhxJqU6reguaCS/VrJ/OTV9dQiP/HFajtY=; b=QBALA3BuTDRocw+9DC2q5BoN+u1ZG/6Eug0J1+TRzxPW4nznBOd2jA3IoHXPG/Y/0Qkeo7+VrcLYGRTICAQUnHl/fwMO228q1gh/jr21RO1vnOjbI0nWDGynBxhYQeqn1MvurvV0YHMA7tt8lDv7OMj07bbmSGqf8nngn3CGuJE= 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 1625482079068964.129094784187; Mon, 5 Jul 2021 03:47:59 -0700 (PDT) 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-484-ZZyUGrZ2MLqIn_0fp-BvBg-1; Mon, 05 Jul 2021 06:47:56 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5A7B718414BB; Mon, 5 Jul 2021 10:47:51 +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 3D38E17C5F; Mon, 5 Jul 2021 10:47:51 +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 EF6781809CB5; Mon, 5 Jul 2021 10:47:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165Al9XA008561 for ; Mon, 5 Jul 2021 06:47:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2FFE860875; Mon, 5 Jul 2021 10:47:09 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7EA7860864; Mon, 5 Jul 2021 10:47:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625482078; 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=Q2WvWVRrWhhxJqU6reguaCS/VrJ/OTV9dQiP/HFajtY=; b=HIL+ZC6p5MLMr7vzaE+FOYOSOVFOImronJx4knMfHIpIxQaVsVtwcj6qIYBdqnB87b57pK iYc/bw3tl9Pbul/oqHwJOhwBXkLEXT5QHly/7buOyOg8Xu9EEig9qNvTlMMfjj4yIxQKmo KRfZzyhn8n7P0/dusGA5F+1EGpB5GlM= X-MC-Unique: ZZyUGrZ2MLqIn_0fp-BvBg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 6/6] virDomainSEVDefParseXML: Remove superfluous variable initialization Date: Mon, 5 Jul 2021 12:46:54 +0200 Message-Id: <20210705104654.77483-7-twiederh@redhat.com> In-Reply-To: <20210705104654.77483-1-twiederh@redhat.com> References: <20210705104654.77483-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1625482080974100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index db8ec23d70..2d8ae7e860 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14721,7 +14721,7 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, VIR_XPATH_NODE_AUTORESTORE(ctxt) g_autoptr(virDomainSEVDef) def =3D NULL; unsigned long policy; - int rc =3D -1; + int rc; =20 def =3D g_new0(virDomainSEVDef, 1); =20 --=20 2.31.1