1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-10 14:13:23 +00:00

(libT) more dead code removal: tr_compareTime() and tr_compareDouble()

This commit is contained in:
Charles Kerr 2008-08-21 20:39:57 +00:00
parent 3df44dad3d
commit ca45125259
3 changed files with 10 additions and 19 deletions

View file

@ -1552,6 +1552,14 @@ struct ChokeData
tr_peer * peer; tr_peer * peer;
}; };
static int
tr_compareDouble( double a, double b )
{
if( a < b ) return -1;
if( a > b ) return 1;
return 0;
}
static int static int
compareChoke( const void * va, const void * vb ) compareChoke( const void * va, const void * vb )
{ {

View file

@ -54,7 +54,8 @@ static int messageQueuing = FALSE;
static tr_msg_list * messageQueue = NULL; static tr_msg_list * messageQueue = NULL;
static tr_msg_list ** messageQueueTail = &messageQueue; static tr_msg_list ** messageQueueTail = &messageQueue;
void tr_msgInit( void ) void
tr_msgInit( void )
{ {
if( !messageLock ) if( !messageLock )
messageLock = tr_lockNew( ); messageLock = tr_lockNew( );
@ -332,22 +333,6 @@ tr_compareUint64( uint64_t a, uint64_t b )
return 0; return 0;
} }
int
tr_compareDouble( double a, double b )
{
if( a < b ) return -1;
if( a > b ) return 1;
return 0;
}
int
tr_compareTime( time_t a, time_t b )
{
if( a < b ) return -1;
if( a > b ) return 1;
return 0;
}
int int
tr_strcmp( const void * a, const void * b ) tr_strcmp( const void * a, const void * b )
{ {

View file

@ -213,8 +213,6 @@ void tr_set_compare( const void * a, size_t aCount,
void * userData ); void * userData );
int tr_compareUint64( uint64_t a, uint64_t b ); int tr_compareUint64( uint64_t a, uint64_t b );
int tr_compareDouble( double a, double b );
int tr_compareTime( time_t a, time_t b );
int tr_strcmp( const void * a, const void * b ); int tr_strcmp( const void * a, const void * b );
int tr_strcasecmp( const char * a, const char * b ); int tr_strcasecmp( const char * a, const char * b );