mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
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:
parent
9fbb035e6f
commit
9f2cf5cc18
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user