提交 5f723b74 编写于 作者: M Michal Privoznik

qemuDomainNamespaceSetupDisk: Fix const correctness

The array of strings we are building is indeed array of const
strings. We are not STRDUP()-ing them nor FREE()-ing them.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
上级 ea8ff2eb
......@@ -11196,7 +11196,7 @@ qemuDomainNamespaceSetupDisk(virDomainObjPtr vm,
virStorageSourcePtr src)
{
virStorageSourcePtr next;
char **paths = NULL;
const char **paths = NULL;
size_t npaths = 0;
int ret = -1;
......@@ -11214,7 +11214,7 @@ qemuDomainNamespaceSetupDisk(virDomainObjPtr vm,
goto cleanup;
}
if (qemuDomainNamespaceMknodPaths(vm, (const char **)paths, npaths) < 0)
if (qemuDomainNamespaceMknodPaths(vm, paths, npaths) < 0)
return -1;
ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册