mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
(trunk libT) use __attribute__((nonnull)) where appropriate. remove two unused functions tr_int2ptr(), tr_ptr2int()
This commit is contained in:
@@ -1082,18 +1082,6 @@ tr_base64_decode( const void * input,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
tr_ptr2int( void* v )
|
||||
{
|
||||
return (intptr_t)v;
|
||||
}
|
||||
|
||||
void*
|
||||
tr_int2ptr( int i )
|
||||
{
|
||||
return (void*)(intptr_t)i;
|
||||
}
|
||||
|
||||
/***
|
||||
****
|
||||
***/
|
||||
@@ -1109,13 +1097,12 @@ tr_lowerBound( const void * key,
|
||||
size_t first = 0;
|
||||
const char * cbase = base;
|
||||
tr_bool exact = FALSE;
|
||||
int c;
|
||||
|
||||
while( nmemb )
|
||||
while( nmemb != 0 )
|
||||
{
|
||||
const size_t half = nmemb / 2;
|
||||
const size_t middle = first + half;
|
||||
c = compar( key, cbase + size*middle );
|
||||
const int c = compar( key, cbase + size*middle );
|
||||
|
||||
if( c <= 0 ) {
|
||||
if( c == 0 )
|
||||
@@ -1127,8 +1114,7 @@ tr_lowerBound( const void * key,
|
||||
}
|
||||
}
|
||||
|
||||
if( exact_match )
|
||||
*exact_match = exact;
|
||||
*exact_match = exact;
|
||||
|
||||
return first;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user