diff --git a/lib/conncache.c b/lib/conncache.c index cec444731c..d4a71c8a97 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -274,7 +274,7 @@ void Curl_cpool_xfer_init(struct Curl_easy *data) CPOOL_LOCK(cpool, data); /* the identifier inside the connection cache */ data->id = cpool->next_easy_id++; - if(cpool->next_easy_id <= 0) + if(cpool->next_easy_id == CURL_OFF_T_MAX) cpool->next_easy_id = 0; data->state.lastconnect_id = -1; diff --git a/lib/urldata.h b/lib/urldata.h index 6e17adcf43..8601a89b8f 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -1216,9 +1216,9 @@ struct Curl_easy { /* once an easy handle is tied to a connection pool a non-negative number to distinguish this transfer from other using the same pool. For easier - tracking in log output. This may wrap around after LONG_MAX to 0 again, - so it has no uniqueness guarantee for large processings. Note: it has no - uniqueness either IFF more than one connection pool is used by the + tracking in log output. This may wrap around after CURL_OFF_T_MAX to 0 + again, so it has no uniqueness guarantee for large processings. Note: it + has no uniqueness either IFF more than one connection pool is used by the libcurl application. */ curl_off_t id; uint32_t master_mid; /* if set, this transfer belongs to a master */