diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-09-30 15:32:43 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-10-01 15:00:34 +0300 |
commit | 53207f93b0886adddf9bc0fa6ac1ba88db7a6682 (patch) | |
tree | 579197e64fa48aa40741f4321c661519e5f0ffa9 /src/testcurl/test_post_loop.c | |
parent | b34d7a3e0293cfd3248000bacfc5f5ae52903e21 (diff) | |
download | libmicrohttpd-53207f93b0886adddf9bc0fa6ac1ba88db7a6682.tar.gz libmicrohttpd-53207f93b0886adddf9bc0fa6ac1ba88db7a6682.zip |
testcurl: Muted some compiler warnings, minor refactoring
Used new API for creating of responses to avoid 'const' drops
Diffstat (limited to 'src/testcurl/test_post_loop.c')
-rw-r--r-- | src/testcurl/test_post_loop.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c index dbfd170d..b4a22eb1 100644 --- a/src/testcurl/test_post_loop.c +++ b/src/testcurl/test_post_loop.c | |||
@@ -522,8 +522,12 @@ testExternalPost () | |||
522 | timeout64 = (uint64_t) ctimeout; | 522 | timeout64 = (uint64_t) ctimeout; |
523 | if (0 == running) | 523 | if (0 == running) |
524 | timeout64 = 0; /* terminate quickly... */ | 524 | timeout64 = 0; /* terminate quickly... */ |
525 | tv.tv_sec = timeout64 / 1000; | 525 | #if ! defined(_WIN32) || defined(__CYGWIN__) |
526 | tv.tv_usec = (timeout64 % 1000) * 1000; | 526 | tv.tv_sec = (time_t) (timeout64 / 1000); |
527 | #else /* Native W32 */ | ||
528 | tv.tv_sec = (long) (timeout64 / 1000); | ||
529 | #endif /* Native W32 */ | ||
530 | tv.tv_usec = (long) (1000 * (timeout64 % 1000)); | ||
527 | if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv)) | 531 | if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv)) |
528 | { | 532 | { |
529 | #ifdef MHD_POSIX_SOCKETS | 533 | #ifdef MHD_POSIX_SOCKETS |