提交 d802d9ab 编写于 作者: J Jiri Denemark

qemu: Fix migration without parameters

The virTypedParamsFilter function doesn't mind params == NULL if nparams
is zero. And there's no need to check for params == NULL && nparams > 0
because this is checked higher in the stack.

In fact all the virCheckNonNull* checks in virTypedParamsFilter are
useless.

https://bugzilla.redhat.com/show_bug.cgi?id=1777094Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 1b285196
......@@ -403,10 +403,6 @@ virTypedParamsFilter(virTypedParameterPtr params,
{
size_t i, n = 0;
virCheckNonNullArgGoto(params, error);
virCheckNonNullArgGoto(name, error);
virCheckNonNullArgGoto(ret, error);
if (VIR_ALLOC_N(*ret, nparams) < 0)
goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册