]> granicus.if.org Git - transmission/commitdiff
(libT) #5267: 'speed limits wrap around too low number (~8589 kB/s)': patch by const
authorJordan Lee <jordan@transmissionbt.com>
Sat, 2 Feb 2013 16:31:05 +0000 (16:31 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sat, 2 Feb 2013 16:31:05 +0000 (16:31 +0000)
libtransmission/bandwidth.c

index 52be1269fc424125f1e5954103558269903b1de6..24695e57034810717df5a5de678c94f4dfb48535 100644 (file)
@@ -184,7 +184,7 @@ allocateBandwidth (tr_bandwidth  * b,
   if (b->band[dir].isLimited)
     {
       const uint64_t nextPulseSpeed = b->band[dir].desiredSpeed_Bps;
-      b->band[dir].bytesLeft = (unsigned int)(nextPulseSpeed * period_msec) / 1000u;
+      b->band[dir].bytesLeft = nextPulseSpeed * period_msec / 1000u;
     }
 
   /* add this bandwidth's peer, if any, to the peer pool */