[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] main_loop: Make main_loop_wait() return void
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2] main_loop: Make main_loop_wait() return void |
Date: |
Tue, 27 Jun 2017 13:37:36 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Mon, Jun 26, 2017 at 03:28:00PM +0100, Peter Maydell wrote:
> In commit e330c118f2a5a the last usage of main_loop_wait() that cared
> about the return value was changed to no longer use it. Drop the
> now-useless return value and make the function return void.
>
> We avoid the awkwardness of ifdeffery to handle the 'ret'
> variable in main_loop_wait() only being wanted if CONFIG_SLIRP
> by simply dropping all the ifdefs. There are stub implementations
> of slirp_pollfds_poll() and slirp_pollfds_fill() already in
> stubs/slirp.c which do nothing, as required.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> This will coincidentally satisfy Coverity, which currently complains
> in CID 1372464 that we call main_loop_wait() in vl.c and ignore the
> return value which may be reporting a poll() syscall failure.
> Essentially we don't expect poll() to fail, except perhaps with
> a transient EINTR -- if it ever did we'd spin retrying endlessly
> I think.
> ---
> include/qemu/main-loop.h | 2 +-
> util/main-loop.c | 8 ++------
> 2 files changed, 3 insertions(+), 7 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature