[libvirt] [PATCH v2 26/32] util: Rename variable in virStorageFileMetadataNew

John Ferlan posted 32 patches 7 years ago
There is a newer version of this series
[libvirt] [PATCH v2 26/32] util: Rename variable in virStorageFileMetadataNew
Posted by John Ferlan 7 years ago
To prepare for subsequent change to use VIR_AUTOPTR logic rename
the @ret to @def.

Signed-off-by: John Ferlan <jferlan@redhat.com>
---
 src/util/virstoragefile.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 907358a8fe..adce5f0fe3 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -1117,21 +1117,21 @@ static virStorageSourcePtr
 virStorageFileMetadataNew(const char *path,
                           int format)
 {
-    virStorageSourcePtr ret = NULL;
+    virStorageSourcePtr def = NULL;
 
-    if (VIR_ALLOC(ret) < 0)
+    if (VIR_ALLOC(def) < 0)
         return NULL;
 
-    ret->format = format;
-    ret->type = VIR_STORAGE_TYPE_FILE;
+    def->format = format;
+    def->type = VIR_STORAGE_TYPE_FILE;
 
-    if (VIR_STRDUP(ret->path, path) < 0)
+    if (VIR_STRDUP(def->path, path) < 0)
         goto error;
 
-    return ret;
+    return def;
 
  error:
-    virStorageSourceFree(ret);
+    virStorageSourceFree(def);
     return NULL;
 }
 
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 26/32] util: Rename variable in virStorageFileMetadataNew
Posted by Ján Tomko 6 years, 12 months ago
On Fri, Feb 08, 2019 at 01:37:20PM -0500, John Ferlan wrote:
>To prepare for subsequent change to use VIR_AUTOPTR logic rename
>the @ret to @def.
>

I guess we could call it a definition even though it does not have 'Def'
in its type name.

>Signed-off-by: John Ferlan <jferlan@redhat.com>
>---
> src/util/virstoragefile.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 26/32] util: Rename variable in virStorageFileMetadataNew
Posted by Erik Skultety 6 years, 12 months ago
On Fri, Feb 08, 2019 at 01:37:20PM -0500, John Ferlan wrote:
> To prepare for subsequent change to use VIR_AUTOPTR logic rename
> the @ret to @def.
>
> Signed-off-by: John Ferlan <jferlan@redhat.com>
> ---
Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list