From: Paolo Bonzini <pbonzini@redhat.com>
To: Peng Liang <liangpeng10@huawei.com>,
qemu-devel@nongnu.org, qemu-stable <qemu-stable@nongnu.org>
Cc: philmd@redhat.com, alejandro.j.jimenez@oracle.com,
laurent@vivier.eu, xiexiangyou@huawei.com, armbru@redhat.com,
alex.bennee@linaro.org
Subject: Re: [PATCH] runstate: Initialize Error * to NULL
Date: Thu, 10 Jun 2021 15:41:22 +0200 [thread overview]
Message-ID: <028fda0a-3918-af41-7dd9-3b64173cb106@redhat.com> (raw)
In-Reply-To: <20210610131729.3906565-1-liangpeng10@huawei.com>
On 10/06/21 15:17, 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(-)
>
> diff --git a/softmmu/runstate.c b/softmmu/runstate.c
> index ce8977c6a29c..54713100c2ea 100644
> --- a/softmmu/runstate.c
> +++ b/softmmu/runstate.c
> @@ -746,7 +746,7 @@ static void qemu_run_exit_notifiers(void)
>
> void qemu_init_subsystems(void)
> {
> - Error *err;
> + Error *err = NULL;
>
> os_set_line_buffering();
>
>
Queued, thanks.
Cc: qemu-stable@nongnu.org
Paolo
prev parent reply other threads:[~2021-06-10 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 13:17 [PATCH] runstate: Initialize Error * to NULL Peng Liang
2021-06-10 13:25 ` Daniel P. Berrangé
2021-06-10 13:41 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=028fda0a-3918-af41-7dd9-3b64173cb106@redhat.com \
--to=pbonzini@redhat.com \
--cc=alejandro.j.jimenez@oracle.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=laurent@vivier.eu \
--cc=liangpeng10@huawei.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=xiexiangyou@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).