fprintf(stderr, "%s:%d curl_easy_init() failed\n", (Y), (Z)); \
res = TEST_ERR_EASY_INIT; \
} \
-} WHILE_FALSE
+} while(0)
#define res_easy_init(A) \
exe_easy_init((A), (__FILE__), (__LINE__))
exe_easy_init((A), (Y), (Z)); \
if(res) \
goto test_cleanup; \
-} WHILE_FALSE
+} while(0)
#define easy_init(A) \
chk_easy_init((A), (__FILE__), (__LINE__))
fprintf(stderr, "%s:%d curl_multi_init() failed\n", (Y), (Z)); \
res = TEST_ERR_MULTI_INIT; \
} \
-} WHILE_FALSE
+} while(0)
#define res_multi_init(A) \
exe_multi_init((A), (__FILE__), (__LINE__))
exe_multi_init((A), (Y), (Z)); \
if(res) \
goto test_cleanup; \
-} WHILE_FALSE
+} while(0)
#define multi_init(A) \
chk_multi_init((A), (__FILE__), (__LINE__))
(Y), (Z), (int)ec, curl_easy_strerror(ec)); \
res = (int)ec; \
} \
-} WHILE_FALSE
+} while(0)
#define res_easy_setopt(A, B, C) \
exe_easy_setopt((A), (B), (C), (__FILE__), (__LINE__))
exe_easy_setopt((A), (B), (C), (Y), (Z)); \
if(res) \
goto test_cleanup; \
-} WHILE_FALSE
+} while(0)
#define easy_setopt(A, B, C) \
chk_easy_setopt((A), (B), (C), (__FILE__), (__LINE__))
(Y), (Z), (int)ec, curl_multi_strerror(ec)); \
res = (int)ec; \
} \
-} WHILE_FALSE
+} while(0)
#define res_multi_setopt(A,B,C) \
exe_multi_setopt((A), (B), (C), (__FILE__), (__LINE__))
exe_multi_setopt((A), (B), (C), (Y), (Z)); \
if(res) \
goto test_cleanup; \
-} WHILE_FALSE
+} while(0)
#define multi_setopt(A,B,C) \
chk_multi_setopt((A), (B), (C), (__FILE__), (__LINE__))
(Y), (Z), (int)ec, curl_multi_strerror(ec)); \
res = (int)ec; \
} \
-} WHILE_FALSE
+} while(0)
#define res_multi_add_handle(A, B) \
exe_multi_add_handle((A), (B), (__FILE__), (__LINE__))
exe_multi_add_handle((A), (B), (Y), (Z)); \
if(res) \
goto test_cleanup; \
-} WHILE_FALSE
+} while(0)
#define multi_add_handle(A, B) \
chk_multi_add_handle((A), (B), (__FILE__), (__LINE__))
(Y), (Z), (int)ec, curl_multi_strerror(ec)); \
res = (int)ec; \
} \
-} WHILE_FALSE
+} while(0)
#define res_multi_remove_handle(A, B) \
exe_multi_remove_handle((A), (B), (__FILE__), (__LINE__))
exe_multi_remove_handle((A), (B), (Y), (Z)); \
if(res) \
goto test_cleanup; \
-} WHILE_FALSE
+} while(0)
#define multi_remove_handle(A, B) \
(Y), (Z), (int)*((B))); \
res = TEST_ERR_NUM_HANDLES; \
} \
-} WHILE_FALSE
+} while(0)
#define res_multi_perform(A, B) \
exe_multi_perform((A), (B), (__FILE__), (__LINE__))
exe_multi_perform((A), (B), (Y), (Z)); \
if(res) \
goto test_cleanup; \
-} WHILE_FALSE
+} while(0)
#define multi_perform(A,B) \
chk_multi_perform((A), (B), (__FILE__), (__LINE__))
(Y), (Z), (int)*((E))); \
res = TEST_ERR_NUM_HANDLES; \
} \
-} WHILE_FALSE
+} while(0)
#define res_multi_fdset(A, B, C, D, E) \
exe_multi_fdset((A), (B), (C), (D), (E), (__FILE__), (__LINE__))
exe_multi_fdset((A), (B), (C), (D), (E), (Y), (Z)); \
if(res) \
goto test_cleanup; \
- } WHILE_FALSE
+ } while(0)
#define multi_fdset(A, B, C, D, E) \
chk_multi_fdset((A), (B), (C), (D), (E), (__FILE__), (__LINE__))
(Y), (Z), (long)*((B))); \
res = TEST_ERR_BAD_TIMEOUT; \
} \
-} WHILE_FALSE
+} while(0)
#define res_multi_timeout(A, B) \
exe_multi_timeout((A), (B), (__FILE__), (__LINE__))
exe_multi_timeout((A), (B), (Y), (Z)); \
if(res) \
goto test_cleanup; \
- } WHILE_FALSE
+ } while(0)
#define multi_timeout(A, B) \
chk_multi_timeout((A), (B), (__FILE__), (__LINE__))
(Y), (Z), (int)*((E))); \
res = TEST_ERR_NUM_HANDLES; \
} \
-} WHILE_FALSE
+} while(0)
#define res_multi_poll(A, B, C, D, E) \
exe_multi_poll((A), (B), (C), (D), (E), (__FILE__), (__LINE__))
exe_multi_poll((A), (B), (C), (D), (E), (Y), (Z)); \
if(res) \
goto test_cleanup; \
-} WHILE_FALSE
+} while(0)
#define multi_poll(A, B, C, D, E) \
chk_multi_poll((A), (B), (C), (D), (E), (__FILE__), (__LINE__))
(Y), (Z), (int)ec, curl_multi_strerror(ec)); \
res = (int)ec; \
} \
-} WHILE_FALSE
+} while(0)
#define res_multi_wakeup(A) \
exe_multi_wakeup((A), (__FILE__), (__LINE__))
exe_multi_wakeup((A), (Y), (Z)); \
if(res) \
goto test_cleanup; \
-} WHILE_FALSE
+} while(0)
#define multi_wakeup(A) \
chk_multi_wakeup((A), (__FILE__), (__LINE__))
(Y), (Z), ec, strerror(ec)); \
res = TEST_ERR_SELECT; \
} \
- } WHILE_FALSE
+ } while(0)
#define res_select_test(A, B, C, D, E) \
exe_select_test((A), (B), (C), (D), (E), (__FILE__), (__LINE__))
exe_select_test((A), (B), (C), (D), (E), (Y), (Z)); \
if(res) \
goto test_cleanup; \
- } WHILE_FALSE
+ } while(0)
#define select_test(A, B, C, D, E) \
chk_select_test((A), (B), (C), (D), (E), (__FILE__), (__LINE__))
#define start_test_timing() do { \
tv_test_start = tutil_tvnow(); \
-} WHILE_FALSE
+} while(0)
#define exe_test_timedout(Y,Z) do { \
if(tutil_tvdiff(tutil_tvnow(), tv_test_start) > TEST_HANG_TIMEOUT) { \
"that it would have run forever.\n", (Y), (Z)); \
res = TEST_ERR_RUNS_FOREVER; \
} \
-} WHILE_FALSE
+} while(0)
#define res_test_timedout() \
exe_test_timedout((__FILE__), (__LINE__))
exe_test_timedout(Y, Z); \
if(res) \
goto test_cleanup; \
- } WHILE_FALSE
+ } while(0)
#define abort_on_test_timeout() \
chk_test_timedout((__FILE__), (__LINE__))
(Y), (Z), (int)ec, curl_easy_strerror(ec)); \
res = (int)ec; \
} \
-} WHILE_FALSE
+} while(0)
#define res_global_init(A) \
exe_global_init((A), (__FILE__), (__LINE__))
exe_global_init((A), (Y), (Z)); \
if(res) \
return res; \
- } WHILE_FALSE
+ } while(0)
/* global_init() is different than other macros. In case of
failure it 'return's instead of going to 'test_cleanup'. */