]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
long/int mess
authorDaniel Stenberg <daniel@haxx.se>
Sat, 11 Jun 2011 20:56:45 +0000 (22:56 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 11 Jun 2011 20:56:45 +0000 (22:56 +0200)
Typecast when converting to int from long to avoid some compiler warnings

lib/select.c

index ab491c3ce3d131366ce19c064b76212da6a65b21..8f6541dee654df6748e38c3be8b7e24fb323e2f3 100644 (file)
@@ -190,7 +190,7 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
      value indicating a blocking call should be performed. */
 
   if(timeout_ms > 0) {
-    pending_ms = timeout_ms;
+    pending_ms = (int)timeout_ms;
     initial_tv = curlx_tvnow();
   }
 
@@ -222,7 +222,7 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
     if(error && error_not_EINTR)
       break;
     if(timeout_ms > 0) {
-      pending_ms = timeout_ms - elapsed_ms;
+      pending_ms = (int)(timeout_ms - elapsed_ms);
       if(pending_ms <= 0)
         break;
     }