From: Jiri Denemark Date: Wed, 27 Nov 2019 16:21:58 +0000 (+0100) Subject: qemu: Fix migration without parameters X-Git-Tag: v5.10.0-rc2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d802d9ab83ad0d852310c79998ee11c0a440b615;p=thirdparty%2Flibvirt.git 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=1777094 Signed-off-by: Jiri Denemark Reviewed-by: Daniel Henrique Barboza Reviewed-by: Erik Skultety --- diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c index 603fcf213a..be3dac1571 100644 --- a/src/util/virtypedparam.c +++ b/src/util/virtypedparam.c @@ -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;