Changeset 6598


Ignore:
Timestamp:
Aug 20, 2008, 2:55:23 PM (13 years ago)
Author:
muks
Message:

Rename function to indicate its stupidity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r6597 r6598  
    138138
    139139static int
    140 tr_simpleRandInt( int sup )
     140tr_stupidRandInt( int sup )
    141141{
    142142    static int init = 0;
     
    622622            setme->priority = inf->pieces[piece].priority;
    623623            setme->peerCount = 0;
    624             setme->random = tr_simpleRandInt( UINT16_MAX );
     624            setme->random = tr_stupidRandInt( UINT16_MAX );
    625625            setme->missingBlockCount = tr_cpMissingBlocksInPiece( tor->completion, piece );
    626626
     
    664664    if( retCount ) {
    665665        tr_peer ** tmp = tr_new( tr_peer*, retCount );
    666         i = tr_simpleRandInt( retCount );
     666        i = tr_stupidRandInt( retCount );
    667667        memcpy( tmp, ret, sizeof(tr_peer*) * retCount );
    668668        memcpy( ret, tmp+i, sizeof(tr_peer*) * (retCount-i) );
     
    16521652        if(( n = tr_ptrArraySize( randPool )))
    16531653        {
    1654             c = tr_ptrArrayNth( randPool, tr_simpleRandInt( n ));
     1654            c = tr_ptrArrayNth( randPool, tr_stupidRandInt( n ));
    16551655            c->doUnchoke = 1;
    16561656            t->optimistic = c->peer;
Note: See TracChangeset for help on using the changeset viewer.