summaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-03-26 13:08:44 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-03-26 23:08:36 +0100
commitb8e9a27afb0e6a79267d4189afd196f636b8778f (patch)
treeb6b76b8ee1447e981fa658de0ace12ced2ff6e19 /lib/multi.c
parent9a4a8ef451ed0a14242dc9e347064cc4bf4cbb87 (diff)
downloadcurl-bagder/http-post-speed-limit.tar.gz
send_speed: simplify the checks for if a speed limit is setbagder/http-post-speed-limit
... as we know the value cannot be set to negative: enforced by setopt()
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 5de479322..c4787a462 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -2069,7 +2069,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
}
else {
send_timeout_ms = 0;
- if(data->set.max_send_speed > 0)
+ if(data->set.max_send_speed)
send_timeout_ms =
Curl_pgrsLimitWaitTime(data->progress.uploaded,
data->progress.ul_limit_size,
@@ -2078,7 +2078,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
*nowp);
recv_timeout_ms = 0;
- if(data->set.max_recv_speed > 0)
+ if(data->set.max_recv_speed)
recv_timeout_ms =
Curl_pgrsLimitWaitTime(data->progress.downloaded,
data->progress.dl_limit_size,
@@ -2105,7 +2105,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
DEBUGASSERT(data->state.buffer);
/* check if over send speed */
send_timeout_ms = 0;
- if(data->set.max_send_speed > 0)
+ if(data->set.max_send_speed)
send_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.uploaded,
data->progress.ul_limit_size,
data->set.max_send_speed,
@@ -2114,7 +2114,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
/* check if over recv speed */
recv_timeout_ms = 0;
- if(data->set.max_recv_speed > 0)
+ if(data->set.max_recv_speed)
recv_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.downloaded,
data->progress.dl_limit_size,
data->set.max_recv_speed,