mirror of
https://github.com/transmission/transmission
synced 2025-02-21 13:46:52 +00:00
Use signed integers for storing the random values
This commit is contained in:
parent
d712f22b21
commit
2ed1e6ee9d
1 changed files with 2 additions and 2 deletions
|
@ -550,7 +550,7 @@ struct tr_refill_piece
|
|||
{
|
||||
tr_priority_t priority;
|
||||
int missingBlockCount;
|
||||
uint16_t random;
|
||||
int random;
|
||||
uint32_t piece;
|
||||
uint32_t peerCount;
|
||||
};
|
||||
|
@ -621,7 +621,7 @@ getPreferredPieces( Torrent * t,
|
|||
setme->piece = piece;
|
||||
setme->priority = inf->pieces[piece].priority;
|
||||
setme->peerCount = 0;
|
||||
setme->random = tr_stupidRandInt( UINT16_MAX );
|
||||
setme->random = tr_stupidRandInt( INT_MAX );
|
||||
setme->missingBlockCount = tr_cpMissingBlocksInPiece( tor->completion, piece );
|
||||
|
||||
for( k=0; k<peerCount; ++k ) {
|
||||
|
|
Loading…
Reference in a new issue