From: Yang Tse Date: Tue, 10 Nov 2009 18:41:03 +0000 (+0000) Subject: Fix compiler warning: conditional expression is constant X-Git-Tag: curl-7_20_0~394 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1aa320dedbf7e9a39fd1dcf599065f6de7bf9fd2;p=thirdparty%2Fcurl.git Fix compiler warning: conditional expression is constant --- diff --git a/ares/acountry.c b/ares/acountry.c index e61613c506..c30e6b7d76 100644 --- a/ares/acountry.c +++ b/ares/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/ares/adig.c b/ares/adig.c index 8488d97e91..2a0b43c5cd 100644 --- a/ares/adig.c +++ b/ares/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/ares/ahost.c b/ares/ahost.c index 4e29340578..ce5d35903c 100644 --- a/ares/ahost.c +++ b/ares/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/ares__read_line.c b/ares/ares__read_line.c index 561b12e775..29f8e5dc0b 100644 --- a/ares/ares__read_line.c +++ b/ares/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;