]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
avoid dependence on the order of the fields in the timeval struct, pointed out
authorDaniel Stenberg <daniel@haxx.se>
Sat, 25 Oct 2003 06:03:50 +0000 (06:03 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 25 Oct 2003 06:03:50 +0000 (06:03 +0000)
by Gisle Vanem

tests/libtest/lib503.c
tests/libtest/lib504.c

index 126e257a6b646fd694f0c75726d3b69036f1b123..f324b35d679b950b330ac8dc18fd83ac910387bf 100644 (file)
@@ -40,7 +40,10 @@ CURLcode test(char *URL)
     while(!done) {
       fd_set rd, wr, exc;
       int max_fd;
-      struct timeval interval={1,0};
+      struct timeval interval;
+
+      interval.tv_sec = 1;
+      interval.tv_usec = 0;
 
       while (res == CURLM_CALL_MULTI_PERFORM) {
         res = curl_multi_perform(m, &running);
index 9eba0b764111d5aacba6b10747ad209833b4d46d..0a9aff2cc35ecd583b686764581a5ce2188fac9f 100644 (file)
@@ -39,7 +39,10 @@ CURLcode test(char *URL)
   if(res && (res != CURLM_CALL_MULTI_PERFORM))
     return 1; /* major failure */
   do {
-    struct timeval interval={1,0};
+    struct timeval interval;
+
+    interval.tv_sec = 1;
+    interval.tv_usec = 0;
 
     fprintf(stderr, "curl_multi_perform()\n");