← Commit list

d0ad652552

Daniel Stenberg
Daniel Stenberg
2025-11-25
SUCCESS Duration: 151s

Subject

progress: remove two redundant variable checks

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/progress.c+4 -5
@@ -109,7 +109,7 @@ UNITTEST CURLcode pgrs_speedcheck(struct Curl_easy *data,
/* A paused transfer is not qualified for speed checks */
return CURLE_OK;
- if((data->progress.current_speed >= 0) && data->set.low_speed_time) {
+ if(data->progress.current_speed >= 0) {
if(data->progress.current_speed < data->set.low_speed_limit) {
if(!data->state.keeps_speed.tv_sec)
/* under the limit at this moment */
@@ -134,10 +134,9 @@ UNITTEST CURLcode pgrs_speedcheck(struct Curl_easy *data,
data->state.keeps_speed.tv_sec = 0;
}
- if(data->set.low_speed_limit)
- /* if low speed limit is enabled, set the expire timer to make this
- connection's speed get checked again in a second */
- Curl_expire(data, 1000, EXPIRE_SPEEDCHECK);
+ /* since low speed limit is enabled, set the expire timer to make this
+ connection's speed get checked again in a second */
+ Curl_expire(data, 1000, EXPIRE_SPEEDCHECK);
return CURLE_OK;
}