From 8eda1778380fac886444582b646e727c0b15609a Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 2 Jan 2009 04:46:38 +0000 Subject: [PATCH] (trunk libT) very minor style cleanup in tr_bandwidthAllocate() --- libtransmission/bandwidth.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libtransmission/bandwidth.c b/libtransmission/bandwidth.c index ebd92e95a..44c04ce9b 100644 --- a/libtransmission/bandwidth.c +++ b/libtransmission/bandwidth.c @@ -316,12 +316,12 @@ tr_bandwidthAllocate( tr_bandwidth * b, * and/or peers that can use it */ n = peerCount; i = n ? tr_cryptoWeakRandInt( n ) : 0; /* pick a random starting point */ - for( ; n>1 ; ) + while( n > 1 ) { const int increment = 1024; - const int byteCount = tr_peerIoFlush( peers[i], dir, increment); + const int bytesUsed = tr_peerIoFlush( peers[i], dir, increment); - if( byteCount == increment ) + if( bytesUsed == increment ) ++i; else { /* peer is done writing for now; move it to the end of the list */ @@ -331,7 +331,6 @@ tr_bandwidthAllocate( tr_bandwidth * b, --n; } - assert( i <= n ); if( i == n ) i = 0; } -- 2.40.0