From: John Ferlan Date: Fri, 8 Feb 2019 13:35:56 +0000 (-0500) Subject: tests: Rename variable in testStorageFileGetMetadata X-Git-Tag: v5.1.0-rc1~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9916f2a3c82575678565c7eb9c5ddfffd981d446;p=thirdparty%2Flibvirt.git tests: Rename variable in testStorageFileGetMetadata 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án Tomko --- 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; }