mirror of
https://github.com/curl/curl.git
synced 2026-07-23 02:17:21 +03:00
Test 573: Use correct type for CURLINFO_CONNECT_TIME
curl_easy_getinfo() called with a pointer to long instead of double would sigbus on RISC processors (e.g. MIPS) due to wrong alignment of pointer address.
This commit is contained in:
parent
5f53c9d94a
commit
22f3b01478
1 changed files with 3 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ int test(char *URL)
|
|||
CURLM *m = NULL;
|
||||
int res = 0;
|
||||
int running=1;
|
||||
long connect_time = 0;
|
||||
double connect_time = 0.0;
|
||||
struct timeval mp_start;
|
||||
char mp_timedout = FALSE;
|
||||
|
||||
|
|
@ -83,8 +83,8 @@ int test(char *URL)
|
|||
}
|
||||
|
||||
curl_easy_getinfo(c, CURLINFO_CONNECT_TIME, &connect_time);
|
||||
if (connect_time==0) {
|
||||
fprintf(stderr, "connect time is 0\n");
|
||||
if (connect_time==0.0) {
|
||||
fprintf(stderr, "connect time is 0.0\n");
|
||||
res = TEST_ERR_MAJOR_BAD;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue