mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
lib573.c: fix double data type variable comparison with zero
This commit is contained in:
parent
46bd8b330a
commit
c482e946f7
@ -38,6 +38,12 @@ int test(char *URL)
|
|||||||
int res = 0;
|
int res = 0;
|
||||||
int running = 1;
|
int running = 1;
|
||||||
double connect_time = 0.0;
|
double connect_time = 0.0;
|
||||||
|
double dbl_epsilon;
|
||||||
|
|
||||||
|
dbl_epsilon = 1.0;
|
||||||
|
do {
|
||||||
|
dbl_epsilon /= 2.0;
|
||||||
|
} while ((double)(1.0 + (dbl_epsilon/2.0)) > (double)1.0);
|
||||||
|
|
||||||
start_test_timing();
|
start_test_timing();
|
||||||
|
|
||||||
@ -81,8 +87,8 @@ int test(char *URL)
|
|||||||
}
|
}
|
||||||
|
|
||||||
curl_easy_getinfo(c, CURLINFO_CONNECT_TIME, &connect_time);
|
curl_easy_getinfo(c, CURLINFO_CONNECT_TIME, &connect_time);
|
||||||
if (connect_time <= 0.0) {
|
if (connect_time < dbl_epsilon) {
|
||||||
fprintf(stderr, "connect time is <=0.0\n");
|
fprintf(stderr, "connect time is < epsilon\n");
|
||||||
res = TEST_ERR_MAJOR_BAD;
|
res = TEST_ERR_MAJOR_BAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user