Permalink
Browse files

fix MSVC compiler warning 'conditional expression is constant'

  • Loading branch information...
1 parent bab721c commit a831da792d627d9b351b9418dbc238cca7cd71fd @yangtse yangtse committed Sep 4, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 acountry.c
  2. +1 −1 ares_init.c
  3. +1 −1 ares_private.h
View
@@ -89,7 +89,7 @@ static int verbose = 0;
#define TRACE(fmt) do { \
if (verbose > 0) \
printf fmt ; \
- } while (0)
+ } WHILE_FALSE
static void wait_ares(ares_channel channel);
static void callback(void *arg, int status, int timeouts, struct hostent *host);
View
@@ -1216,7 +1216,7 @@ static int init_by_defaults(ares_channel channel)
goto error;
}
- } while(0);
+ } WHILE_FALSE;
dot = strchr(hostname, '.');
if (dot) {
View
@@ -342,7 +342,7 @@ long ares__tvdiff(struct timeval t1, struct timeval t2);
do { \
if ((c)->sock_state_cb) \
(c)->sock_state_cb((c)->sock_state_cb_data, (s), (r), (w)); \
- } while (0)
+ } WHILE_FALSE
#ifdef CURLDEBUG
/* This is low-level hard-hacking memory leak tracking and similar. Using the

0 comments on commit a831da7

Please sign in to comment.