提交 9f2cf5cc 编写于 作者: J John Ferlan

util: Rename variable in virStorageFileMetadataNew

To prepare for subsequent change to use VIR_AUTOPTR logic rename
the @ret to @def.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 9fbb035e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册