[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] runstate: Initialize Error * to NULL
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH] runstate: Initialize Error * to NULL |
Date: |
Thu, 10 Jun 2021 14:25:12 +0100 |
User-agent: |
Mutt/2.0.7 (2021-05-04) |
On Thu, Jun 10, 2021 at 09:17:29PM +0800, Peng Liang wrote:
> Based on the description of error_setg(), the local variable err in
> qemu_init_subsystems() should be initialized to NULL.
>
> Fix: efd7ab22fb "vl: extract qemu_init_subsystems"
> Signed-off-by: Peng Liang <liangpeng10@huawei.com>
> ---
> The patch is generated by the following coccinelle script (thanks to
> Markus):
> @ r @
> identifier id;
> @@
> (
> static Error *id;
> |
> Error *id
> + = NULL
> ;
> )
> And exclude the modifications in softmmu/vl.c (which has fixed by
> Zhenzhong Duan already) and util/error.c (which are unnecessary).
>
> softmmu/runstate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|