From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH] util: Adjust qemu_guest_getrandom_nofail for Coverity
Date: Fri, 31 May 2019 11:44:32 +0200 [thread overview]
Message-ID: <5d985216-8521-f4a2-a9c3-7a00c6066b2f@redhat.com> (raw)
In-Reply-To: <20190530173824.30699-1-richard.henderson@linaro.org>
On 5/30/19 7:38 PM, Richard Henderson wrote:
> Explicitly ignore the return value of qemu_guest_getrandom.
> Because we use error_fatal, all errors are already caught.
>
> Fixes: CID 1401701
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> util/guest-random.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/util/guest-random.c b/util/guest-random.c
> index e8124a3cad..00a08fd981 100644
> --- a/util/guest-random.c
> +++ b/util/guest-random.c
> @@ -56,7 +56,7 @@ int qemu_guest_getrandom(void *buf, size_t len, Error **errp)
>
> void qemu_guest_getrandom_nofail(void *buf, size_t len)
> {
> - qemu_guest_getrandom(buf, len, &error_fatal);
> + (void)qemu_guest_getrandom(buf, len, &error_fatal);
> }
>
> uint64_t qemu_guest_random_seed_thread_part1(void)
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
next prev parent reply other threads:[~2019-05-31 9:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 17:38 [Qemu-devel] [PATCH] util: Adjust qemu_guest_getrandom_nofail for Coverity Richard Henderson
2019-05-31 9:00 ` Peter Maydell
2019-05-31 9:44 ` Philippe Mathieu-Daudé [this message]
2019-06-06 9:21 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
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=5d985216-8521-f4a2-a9c3-7a00c6066b2f@redhat.com \
--to=philmd@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).