Ignore:
Timestamp:
Aug 21, 2008, 7:03:56 PM (13 years ago)
Author:
charles
Message:

(libT) remove some dead functions: tr_calloc(), tr_compareUint16(), tr_compareUint32()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r6613 r6616  
    326326
    327327int
    328 tr_compareUint16( uint16_t a, uint16_t b )
    329 {
    330     if( a < b ) return -1;
    331     if( a > b ) return 1;
    332     return 0;
    333 }
    334 
    335 int
    336 tr_compareUint32( uint32_t a, uint32_t b )
    337 {
    338     if( a < b ) return -1;
    339     if( a > b ) return 1;
    340     return 0;
    341 }
    342 
    343 int
    344328tr_compareUint64( uint64_t a, uint64_t b )
    345329{
     
    673657
    674658void*
    675 tr_calloc( size_t nmemb, size_t size )
    676 {
    677     return nmemb && size ? calloc( nmemb, size ) : NULL;
    678 }
    679 
    680 void*
    681659tr_malloc( size_t size )
    682660{
     
    725703tr_bitfieldDup( const tr_bitfield * in )
    726704{
    727     tr_bitfield * ret = calloc( 1, sizeof(tr_bitfield) );
     705    tr_bitfield * ret = tr_new0( tr_bitfield, 1 );
    728706    ret->bitCount = in->bitCount;
    729707    ret->byteCount = in->byteCount;
Note: See TracChangeset for help on using the changeset viewer.