summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--adig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/adig.c b/adig.c
index ff1cd44..47fa5a4 100644
--- a/adig.c
+++ b/adig.c
@@ -390,9 +390,9 @@ int main(int argc, char **argv)
break;
tvp = ares_timeout(channel, NULL, &tv);
count = select(nfds, &read_fds, &write_fds, NULL, tvp);
- if (count < 0 && SOCKERRNO != EINVAL)
+ if (count < 0 && (status = SOCKERRNO) != EINVAL)
{
- perror("select");
+ printf("select fail: %d", status);
return 1;
}
ares_process(channel, &read_fds, &write_fds);