Commit 605952e5 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Fix signedness bug in bucket calculation.

parent d2da6d17
...@@ -166,7 +166,7 @@ check_bucket(struct network *net) ...@@ -166,7 +166,7 @@ check_bucket(struct network *net)
{ {
if(net->bucket > 0 && now.tv_sec > net->bucket_time) { if(net->bucket > 0 && now.tv_sec > net->bucket_time) {
net->bucket = net->bucket =
MAX(0, net->bucket - 40 * (now.tv_sec - net->bucket_time)); MAX(0, (int)net->bucket - 40 * (now.tv_sec - net->bucket_time));
} }
net->bucket_time = now.tv_sec; net->bucket_time = now.tv_sec;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment