From nobody Mon Feb 9 00:20:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1549651138997451.3811603204899; Fri, 8 Feb 2019 10:38:58 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id 1727AC01DDFA; Fri, 8 Feb 2019 18:38: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 B97CF6091C; Fri, 8 Feb 2019 18:38:56 +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 6A63918E306A; Fri, 8 Feb 2019 18:38:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x18Ic58I007798 for ; Fri, 8 Feb 2019 13:38:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id BC46517BB7; Fri, 8 Feb 2019 18:38:05 +0000 (UTC) Received: from unknown0050b6a41c42.attlocal.net.com (ovpn-117-20.phx2.redhat.com [10.3.117.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 762E060BE0 for ; Fri, 8 Feb 2019 18:38:05 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Fri, 8 Feb 2019 13:37:21 -0500 Message-Id: <20190208183726.30903-28-jferlan@redhat.com> In-Reply-To: <20190208183726.30903-1-jferlan@redhat.com> References: <20190208183726.30903-1-jferlan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 27/32] util: Rename variable in virStorageSourceCopy 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 08 Feb 2019 18:38:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" To prepare for subsequent change to use VIR_AUTOPTR logic rename the @ret to @def. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety Reviewed-by: J=C3=A1n Tomko --- src/util/virstoragefile.c | 96 +++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index adce5f0fe3..45399f98ce 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2243,98 +2243,98 @@ virStorageSourcePtr virStorageSourceCopy(const virStorageSource *src, bool backingChain) { - virStorageSourcePtr ret =3D NULL; + virStorageSourcePtr def =3D NULL; =20 - if (VIR_ALLOC(ret) < 0) + if (VIR_ALLOC(def) < 0) return NULL; =20 - ret->id =3D src->id; - ret->type =3D src->type; - ret->protocol =3D src->protocol; - ret->format =3D src->format; - ret->capacity =3D src->capacity; - ret->allocation =3D src->allocation; - ret->has_allocation =3D src->has_allocation; - ret->physical =3D src->physical; - ret->readonly =3D src->readonly; - ret->shared =3D src->shared; - ret->haveTLS =3D src->haveTLS; - ret->tlsFromConfig =3D src->tlsFromConfig; - ret->detected =3D src->detected; - ret->debugLevel =3D src->debugLevel; - ret->debug =3D src->debug; - ret->iomode =3D src->iomode; - ret->cachemode =3D src->cachemode; - ret->discard =3D src->discard; - ret->detect_zeroes =3D src->detect_zeroes; + def->id =3D src->id; + def->type =3D src->type; + def->protocol =3D src->protocol; + def->format =3D src->format; + def->capacity =3D src->capacity; + def->allocation =3D src->allocation; + def->has_allocation =3D src->has_allocation; + def->physical =3D src->physical; + def->readonly =3D src->readonly; + def->shared =3D src->shared; + def->haveTLS =3D src->haveTLS; + def->tlsFromConfig =3D src->tlsFromConfig; + def->detected =3D src->detected; + def->debugLevel =3D src->debugLevel; + def->debug =3D src->debug; + def->iomode =3D src->iomode; + def->cachemode =3D src->cachemode; + def->discard =3D src->discard; + def->detect_zeroes =3D src->detect_zeroes; =20 /* storage driver metadata are not copied */ - ret->drv =3D NULL; - - if (VIR_STRDUP(ret->path, src->path) < 0 || - VIR_STRDUP(ret->volume, src->volume) < 0 || - VIR_STRDUP(ret->relPath, src->relPath) < 0 || - VIR_STRDUP(ret->backingStoreRaw, src->backingStoreRaw) < 0 || - VIR_STRDUP(ret->snapshot, src->snapshot) < 0 || - VIR_STRDUP(ret->configFile, src->configFile) < 0 || - VIR_STRDUP(ret->nodeformat, src->nodeformat) < 0 || - VIR_STRDUP(ret->nodestorage, src->nodestorage) < 0 || - VIR_STRDUP(ret->compat, src->compat) < 0 || - VIR_STRDUP(ret->tlsAlias, src->tlsAlias) < 0 || - VIR_STRDUP(ret->tlsCertdir, src->tlsCertdir) < 0) + def->drv =3D NULL; + + if (VIR_STRDUP(def->path, src->path) < 0 || + VIR_STRDUP(def->volume, src->volume) < 0 || + VIR_STRDUP(def->relPath, src->relPath) < 0 || + VIR_STRDUP(def->backingStoreRaw, src->backingStoreRaw) < 0 || + VIR_STRDUP(def->snapshot, src->snapshot) < 0 || + VIR_STRDUP(def->configFile, src->configFile) < 0 || + VIR_STRDUP(def->nodeformat, src->nodeformat) < 0 || + VIR_STRDUP(def->nodestorage, src->nodestorage) < 0 || + VIR_STRDUP(def->compat, src->compat) < 0 || + VIR_STRDUP(def->tlsAlias, src->tlsAlias) < 0 || + VIR_STRDUP(def->tlsCertdir, src->tlsCertdir) < 0) goto error; =20 if (src->nhosts) { - if (!(ret->hosts =3D virStorageNetHostDefCopy(src->nhosts, src->ho= sts))) + if (!(def->hosts =3D virStorageNetHostDefCopy(src->nhosts, src->ho= sts))) goto error; =20 - ret->nhosts =3D src->nhosts; + def->nhosts =3D src->nhosts; } =20 if (src->srcpool && - !(ret->srcpool =3D virStorageSourcePoolDefCopy(src->srcpool))) + !(def->srcpool =3D virStorageSourcePoolDefCopy(src->srcpool))) goto error; =20 if (src->features && - !(ret->features =3D virBitmapNewCopy(src->features))) + !(def->features =3D virBitmapNewCopy(src->features))) goto error; =20 if (src->encryption && - !(ret->encryption =3D virStorageEncryptionCopy(src->encryption))) + !(def->encryption =3D virStorageEncryptionCopy(src->encryption))) goto error; =20 if (src->perms && - !(ret->perms =3D virStoragePermsCopy(src->perms))) + !(def->perms =3D virStoragePermsCopy(src->perms))) goto error; =20 if (src->timestamps && - !(ret->timestamps =3D virStorageTimestampsCopy(src->timestamps))) + !(def->timestamps =3D virStorageTimestampsCopy(src->timestamps))) goto error; =20 - if (virStorageSourceSeclabelsCopy(ret, src) < 0) + if (virStorageSourceSeclabelsCopy(def, src) < 0) goto error; =20 if (src->auth && - !(ret->auth =3D virStorageAuthDefCopy(src->auth))) + !(def->auth =3D virStorageAuthDefCopy(src->auth))) goto error; =20 if (src->pr && - !(ret->pr =3D virStoragePRDefCopy(src->pr))) + !(def->pr =3D virStoragePRDefCopy(src->pr))) goto error; =20 - if (virStorageSourceInitiatorCopy(&ret->initiator, &src->initiator)) + if (virStorageSourceInitiatorCopy(&def->initiator, &src->initiator)) goto error; =20 if (backingChain && src->backingStore) { - if (!(ret->backingStore =3D virStorageSourceCopy(src->backingStore, + if (!(def->backingStore =3D virStorageSourceCopy(src->backingStore, true))) goto error; } =20 - return ret; + return def; =20 error: - virStorageSourceFree(ret); + virStorageSourceFree(def); return NULL; } =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list