From nobody Sun Feb 8 22:57:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1580910126451750.7790693967895; Wed, 5 Feb 2020 05:42:06 -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-136-OmwHmRj6MqWrR1WwysgS1A-1; Wed, 05 Feb 2020 08:42:03 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CAE69190D34A; Wed, 5 Feb 2020 13:41:57 +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 A5C0F5DA7B; Wed, 5 Feb 2020 13:41:57 +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 650B518089CF; Wed, 5 Feb 2020 13:41:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 015Df9lu008434 for ; Wed, 5 Feb 2020 08:41:09 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9E7D41001B05; Wed, 5 Feb 2020 13:41:09 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27A0C10018FF for ; Wed, 5 Feb 2020 13:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580910125; 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=5GSOmGdJhaRhBEno9llQrMO2m4dgS5mtl6tO52TccNg=; b=CGSWyuiv7hZJgq1D7qbSdwcbEBtXAqSNzNRJEK9LE2qdbMwwL+pfyoKl9NYuaxfx9oWZec pKxd6pXhYoLh8Zi41za4Rt4SLwfW9Jk76/zgp+zKowTP90HbvE7HE9earVcrxdNOinU3fU L/Y3lRBU3bfHgFClens7MByXKjcuh8c= From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 6/9] virDomainDiskTranslateSourcePoolAuth: Take virStorageSourcePtr instead of virDomainDiskDefPtr Date: Wed, 5 Feb 2020 14:40:57 +0100 Message-Id: <802aa834948fb21cf28d3c17675b3e458a59cae5.1580909976.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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.14 X-MC-Unique: OmwHmRj6MqWrR1WwysgS1A-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Only 'def->src' was ever used in this function. Use the source directly. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bcb17dcc6e..4545c6b314 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -31375,18 +31375,18 @@ virDomainDiskAddISCSIPoolSourceHost(virStorageSou= rcePtr src, static int -virDomainDiskTranslateSourcePoolAuth(virDomainDiskDefPtr def, +virDomainDiskTranslateSourcePoolAuth(virStorageSourcePtr src, virStoragePoolSourcePtr source) { /* Only necessary when authentication set */ if (!source->auth) return 0; - def->src->auth =3D virStorageAuthDefCopy(source->auth); - if (!def->src->auth) + src->auth =3D virStorageAuthDefCopy(source->auth); + if (!src->auth) return -1; /* A doesn't use src->auth->authType =3D VIR_STORAGE_AUTH_TYPE_NONE; + src->auth->authType =3D VIR_STORAGE_AUTH_TYPE_NONE; return 0; } @@ -31398,7 +31398,7 @@ virDomainDiskTranslateISCSIDirect(virDomainDiskDefP= tr def, def->src->srcpool->actualtype =3D VIR_STORAGE_TYPE_NETWORK; def->src->protocol =3D VIR_STORAGE_NET_PROTOCOL_ISCSI; - if (virDomainDiskTranslateSourcePoolAuth(def, + if (virDomainDiskTranslateSourcePoolAuth(def->src, &pooldef->source) < 0) return -1; --=20 2.24.1