From ddaaa92c31fadb848236279e9fce609d81ed15e2 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Wed, 11 May 2011 21:09:31 +0000 Subject: [PATCH] (trunk libT) make allocateBandwidth()'s "priority" field const. --- libtransmission/bandwidth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libtransmission/bandwidth.c b/libtransmission/bandwidth.c index b9bb0125f..70bb07f4e 100644 --- a/libtransmission/bandwidth.c +++ b/libtransmission/bandwidth.c @@ -167,7 +167,7 @@ allocateBandwidth( tr_bandwidth * b, unsigned int period_msec, tr_ptrArray * peer_pool ) { - tr_priority_t priority; + const tr_priority_t priority = MAX( parent_priority, b->priority ); assert( tr_isBandwidth( b ) ); assert( tr_isDirection( dir ) ); @@ -186,8 +186,6 @@ allocateBandwidth( tr_bandwidth * b, #endif } - priority = MAX( parent_priority, b->priority ); - /* add this bandwidth's peer, if any, to the peer pool */ if( b->peer != NULL ) { b->peer->priority = priority;