]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Fix migration without parameters
authorJiri Denemark <jdenemar@redhat.com>
Wed, 27 Nov 2019 16:21:58 +0000 (17:21 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 28 Nov 2019 13:27:11 +0000 (14:27 +0100)
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=1777094

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/util/virtypedparam.c

index 603fcf213a3334273ee5fa075461847f0f4bea64..be3dac15712b3bfddf0fb174252578a85a4fbd5d 100644 (file)
@@ -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;