Skip to content

Commit

Permalink
util: Adjust qemu_guest_getrandom_nofail for Coverity
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190530173824.30699-1-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
  • Loading branch information
rth7680 authored and vivier committed Jun 6, 2019
1 parent cd2fa2a commit 11259e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/guest-random.c
Expand Up @@ -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)
Expand Down

0 comments on commit 11259e9

Please sign in to comment.