]> granicus.if.org Git - curl/commitdiff
gtls: fix compiler warning
authorMarcel Raad <raad@teamviewer.com>
Thu, 6 Apr 2017 17:34:44 +0000 (19:34 +0200)
committerMarcel Raad <raad@teamviewer.com>
Thu, 6 Apr 2017 17:34:44 +0000 (19:34 +0200)
Curl_timeleft returns time_t instead of long since commit
21aa32d30dbf319f2d336e0cb68d3a3235869fbb.

lib/vtls/gtls.c

index f41036049bad6007aa5f4c4b0e73a1574c6e890b..d705c72d8b37a7254820138313528a5e55c660a5 100644 (file)
@@ -278,7 +278,7 @@ static CURLcode handshake(struct connectdata *conn,
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   gnutls_session_t session = conn->ssl[sockindex].session;
   curl_socket_t sockfd = conn->sock[sockindex];
-  long timeout_ms;
+  time_t timeout_ms;
   int rc;
   int what;
 
@@ -314,7 +314,7 @@ static CURLcode handshake(struct connectdata *conn,
           return CURLE_OK;
         else if(timeout_ms) {
           /* timeout */
-          failf(data, "SSL connection timeout at %ld", timeout_ms);
+          failf(data, "SSL connection timeout at %ld", (long)timeout_ms);
           return CURLE_OPERATION_TIMEDOUT;
         }
       }