Fix Coverity error CID 56882 Signed-off-by: Gregor Jasny <gja...@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.9.3 (Apple Git-50)