Subject: Re: [PATCH 4/5] Re-start loop if select fails

Re: [PATCH 4/5] Re-start loop if select fails

From: David Drysdale <drysdale_at_google.com>
Date: Mon, 22 Sep 2014 10:58:27 +0100

LGTM

On Fri, Sep 19, 2014 at 7:51 PM, Gregor Jasny <gjasny_at_googlemail.com> wrote:
> Fix Coverity error CID 56882
>
> Signed-off-by: Gregor Jasny <gjasny_at_googlemail.com>
> ---
> acountry.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/acountry.c b/acountry.c
> index fae9f9f..1fe750c 100644
> --- a/acountry.c
> +++ b/acountry.c
> @@ -200,7 +200,9 @@ static void wait_ares(ares_channel channel)
> if (nfds == 0)
> break;
> tvp = ares_timeout(channel, NULL, &tv);
> - select(nfds, &read_fds, &write_fds, NULL, tvp);
> + nfds = select(nfds, &read_fds, &write_fds, NULL, tvp);
> + if (nfds < 0)
> + continue;
> ares_process(channel, &read_fds, &write_fds);
> }
> }
> --
> 1.8.5.2 (Apple Git-48)
>
Received on 2014-09-22