aboutsummaryrefslogtreecommitdiff
path: root/lib/connect.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-07-31 15:30:31 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-08-01 07:43:24 +0200
commitb1616dad8f088d873d88f88b4d884335a4ca285f (patch)
tree31637b618958b051693d23591042468243fe0b35 /lib/connect.c
parent7c14dde9240a6a113358fe551f378328a41477e2 (diff)
timediff: make it 64 bit (if possible) even with 32 bit time_t
... to make it hold microseconds too. Fixes #4165 Closes #4168
Diffstat (limited to 'lib/connect.c')
-rw-r--r--lib/connect.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 59084f251..be9fcba66 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -795,8 +795,8 @@ CURLcode Curl_is_connected(struct connectdata *conn,
if(rc == 0) { /* no connection yet */
error = 0;
if(Curl_timediff(now, conn->connecttime) >= conn->timeoutms_per_addr) {
- infof(data, "After %ldms connect time, move on!\n",
- conn->timeoutms_per_addr);
+ infof(data, "After %" CURL_FORMAT_TIMEDIFF_T
+ "ms connect time, move on!\n", conn->timeoutms_per_addr);
error = ETIMEDOUT;
}
@@ -862,11 +862,11 @@ CURLcode Curl_is_connected(struct connectdata *conn,
Curl_strerror(error, buffer, sizeof(buffer)));
conn->timeoutms_per_addr = conn->tempaddr[i]->ai_next == NULL ?
- allow : allow / 2;
+ allow : allow / 2;
status = trynextip(conn, sockindex, i);
- if(status != CURLE_COULDNT_CONNECT
- || conn->tempsock[other] == CURL_SOCKET_BAD)
+ if((status != CURLE_COULDNT_CONNECT) ||
+ conn->tempsock[other] == CURL_SOCKET_BAD)
/* the last attempt failed and no other sockets remain open */
result = status;
}