util: Rename variable in virStorageFileMetadataNew

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>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
John Ferlan 2019-02-08 08:25:50 -05:00
parent 9fbb035e6f
commit 9f2cf5cc18

View File

@ -1125,21 +1125,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;
}