From 1c5f8be38d7eed4c18eb52df8e6684a9a02c93e0 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 10 Nov 2009 18:41:03 +0000 Subject: [PATCH] Fix compiler warning: conditional expression is constant --- acountry.c | 2 +- adig.c | 2 +- ahost.c | 2 +- ares__read_line.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/acountry.c b/acountry.c index e61613c..c30e6b7 100644 --- a/acountry.c +++ b/acountry.c @@ -199,7 +199,7 @@ int main(int argc, char **argv) */ static void wait_ares(ares_channel channel) { - while (1) + for (;;) { struct timeval *tvp, tv; fd_set read_fds, write_fds; diff --git a/adig.c b/adig.c index 8488d97..2a0b43c 100644 --- a/adig.c +++ b/adig.c @@ -321,7 +321,7 @@ int main(int argc, char **argv) } /* Wait for all queries to complete. */ - while (1) + for (;;) { FD_ZERO(&read_fds); FD_ZERO(&write_fds); diff --git a/ahost.c b/ahost.c index 4e29340..ce5d359 100644 --- a/ahost.c +++ b/ahost.c @@ -140,7 +140,7 @@ int main(int argc, char **argv) } /* Wait for all queries to complete. */ - while (1) + for (;;) { FD_ZERO(&read_fds); FD_ZERO(&write_fds); diff --git a/ares__read_line.c b/ares__read_line.c index 561b12e..29f8e5d 100644 --- a/ares__read_line.c +++ b/ares__read_line.c @@ -44,7 +44,7 @@ int ares__read_line(FILE *fp, char **buf, size_t *bufsize) *bufsize = 128; } - while (1) + for (;;) { if (!fgets(*buf + offset, (int)(*bufsize - offset), fp)) return (offset != 0) ? 0 : (ferror(fp)) ? ARES_EFILE : ARES_EOF; -- 2.7.4