[libvirt] [PATCH v2 31/32] tests: Rename variable in testStorageFileGetMetadata

John Ferlan posted 32 patches 7 years ago
There is a newer version of this series
[libvirt] [PATCH v2 31/32] tests: Rename variable in testStorageFileGetMetadata
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>
---
 tests/virstoragetest.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 49b8f42e6d..8db1d294b0 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -95,32 +95,32 @@ testStorageFileGetMetadata(const char *path,
                            uid_t uid, gid_t gid)
 {
     struct stat st;
-    virStorageSourcePtr ret = NULL;
+    virStorageSourcePtr def = NULL;
 
-    if (VIR_ALLOC(ret) < 0)
+    if (VIR_ALLOC(def) < 0)
         return NULL;
 
-    ret->type = VIR_STORAGE_TYPE_FILE;
-    ret->format = format;
+    def->type = VIR_STORAGE_TYPE_FILE;
+    def->format = format;
 
     if (stat(path, &st) == 0) {
         if (S_ISDIR(st.st_mode)) {
-            ret->type = VIR_STORAGE_TYPE_DIR;
+            def->type = VIR_STORAGE_TYPE_DIR;
         } else if (S_ISBLK(st.st_mode)) {
-            ret->type = VIR_STORAGE_TYPE_BLOCK;
+            def->type = VIR_STORAGE_TYPE_BLOCK;
         }
     }
 
-    if (VIR_STRDUP(ret->path, path) < 0)
+    if (VIR_STRDUP(def->path, path) < 0)
         goto error;
 
-    if (virStorageFileGetMetadata(ret, uid, gid, false) < 0)
+    if (virStorageFileGetMetadata(def, uid, gid, false) < 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 31/32] tests: Rename variable in testStorageFileGetMetadata
Posted by Ján Tomko 6 years, 12 months ago
On Fri, Feb 08, 2019 at 01:37:25PM -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>
>---
> tests/virstoragetest.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 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 31/32] tests: Rename variable in testStorageFileGetMetadata
Posted by Erik Skultety 6 years, 12 months ago
On Fri, Feb 08, 2019 at 01:37:25PM -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