[libvirt] [PATCH] qemu: Fix migration without parameters

Jiri Denemark posted 1 patch 1 week ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/b0b324c8e1781add7576eda875665660e442140e.1574936644.git.jdenemar@redhat.com
src/util/virtypedparam.c | 4 ----
1 file changed, 4 deletions(-)

[libvirt] [PATCH] qemu: Fix migration without parameters

Posted by Jiri Denemark 1 week ago
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>
---
 src/util/virtypedparam.c | 4 ----
 1 file changed, 4 deletions(-)

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;
 
-- 
2.24.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] qemu: Fix migration without parameters

Posted by Erik Skultety 1 week ago
On Thu, Nov 28, 2019 at 11:24:04AM +0100, Jiri Denemark wrote:
> 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: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] qemu: Fix migration without parameters

Posted by Daniel Henrique Barboza 1 week ago

On 11/28/19 7:24 AM, Jiri Denemark wrote:
> 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>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list