aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorTor Arntsen <tor@spacetec.no>2010-05-20 16:33:29 +0200
committerKamil Dudka <kdudka@redhat.com>2010-05-20 17:12:53 +0200
commit22f3b01478246687386bfcaa97e07272c8868bf3 (patch)
treeae688b8340d82cbf49434de1fd91837fc538607f /tests/libtest
parent5f53c9d94a41622e14758d81290ff054dfee4395 (diff)
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.
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/lib573.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/libtest/lib573.c b/tests/libtest/lib573.c
index e08b6df46..db5889e34 100644
--- a/tests/libtest/lib573.c
+++ b/tests/libtest/lib573.c
@@ -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;
}