Changeset 6425


Ignore:
Timestamp:
Aug 1, 2008, 4:43:22 PM (13 years ago)
Author:
charles
Message:

minor text cleanup

Location:
trunk/libtransmission
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/Makefile.am

    r6297 r6425  
    11AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(top_srcdir)/third-party/ -D__TRANSMISSION__ $(LIBEVENT_CPPFLAGS)
    2 AM_CFLAGS = $(OPENSSL_CFLAGS) $(LIBCURL_CFLAGS) $(PTHREAD_CFLAGS)
     2AM_CFLAGS = $(LIBCURL_CFLAGS) $(OPENSSL_CFLAGS) $(PTHREAD_CFLAGS)
    33
    44noinst_LIBRARIES = libtransmission.a
     
    111111    $(top_builddir)/third-party/libevent/libevent.la \
    112112    $(INTLLIBS) \
     113    $(LIBCURL_LIBS) \
    113114    $(OPENSSL_LIBS) \
    114     $(LIBCURL_LIBS) \
    115115    $(PTHREAD_LIBS) \
    116116    -lm
  • trunk/libtransmission/bencode.c

    r6389 r6425  
    3434tr_bencIsType( const tr_benc * val, int type )
    3535{
    36     return ( ( val != NULL ) && ( val->type == type ) );
     36    return ( ( val ) && ( val->type == type ) );
    3737}
    3838
     
    177177    tr_benc * parent;
    178178
    179     assert( top != NULL );
    180     assert( parentStack != NULL );
     179    assert( top );
     180    assert( parentStack );
    181181
    182182    if( tr_ptrArrayEmpty( parentStack ) )
     
    184184
    185185    parent = tr_ptrArrayBack( parentStack );
    186     assert( parent != NULL );
     186    assert( parent );
    187187
    188188    /* dictionary keys must be strings */
     
    301301    err = !isSomething( top ) || !tr_ptrArrayEmpty( parentStack );
    302302
    303     if( !err && ( setme_end != NULL ) )
     303    if( !err && setme_end )
    304304        *setme_end = buf;
    305305
     
    904904    bencWalk( top, &walkFuncs, out );
    905905   
    906     if( len != NULL )
     906    if( len )
    907907        *len = EVBUFFER_LENGTH( out );
    908908    ret = tr_strndup( (char*) EVBUFFER_DATA( out ), EVBUFFER_LENGTH( out ) );
     
    12061206    if( EVBUFFER_LENGTH( data.out ) )
    12071207        evbuffer_add_printf( data.out, "\n" );
    1208     if( len != NULL )
     1208    if( len )
    12091209        *len = EVBUFFER_LENGTH( data.out );
    12101210    ret = tr_strndup( (char*) EVBUFFER_DATA( data.out ), EVBUFFER_LENGTH( data.out ) );
  • trunk/libtransmission/completion.c

    r6132 r6425  
    164164    tr_block_index_t block;
    165165
    166     assert( cp != NULL );
     166    assert( cp );
    167167    assert( piece < tor->info.pieceCount );
    168168    assert( start < tor->blockCount );
  • trunk/libtransmission/crypto.c

    r4597 r6425  
    242242    crypto->torrentHashIsSet = hash ? 1 : 0;
    243243
    244     if( hash != NULL )
     244    if( hash )
    245245        memcpy( crypto->torrentHash, hash, SHA_DIGEST_LENGTH );
    246246    else
     
    251251tr_cryptoGetTorrentHash( const tr_crypto * crypto )
    252252{
    253     assert( crypto != NULL );
     253    assert( crypto );
    254254    assert( crypto->torrentHashIsSet );
    255255
     
    260260tr_cryptoHasTorrentHash( const tr_crypto * crypto )
    261261{
    262     assert( crypto != NULL );
     262    assert( crypto );
    263263
    264264    return crypto->torrentHashIsSet ? 1 : 0;
  • trunk/libtransmission/fdlimit.c

    r5843 r6425  
    386386    struct sockaddr_in sock;
    387387
    388     assert( addr != NULL );
    389     assert( port != NULL );
     388    assert( addr );
     389    assert( port );
    390390
    391391    tr_lockLock( gFd->lock );
  • trunk/libtransmission/handshake.c

    r6050 r6425  
    287287    public_key = tr_cryptoGetMyPublicKey( handshake->crypto, &len );
    288288    assert( len == KEY_LEN );
    289     assert( public_key != NULL );
     289    assert( public_key );
    290290    evbuffer_add( outbuf, public_key, len );
    291291
     
    10581058tr_handshakeGetAddr( const struct tr_handshake * handshake, uint16_t * port )
    10591059{
    1060     assert( handshake != NULL );
    1061     assert( handshake->io != NULL );
     1060    assert( handshake );
     1061    assert( handshake->io );
    10621062
    10631063    return tr_peerIoGetAddress( handshake->io, port );
  • trunk/libtransmission/inout.c

    r6354 r6425  
    241241    tr_lockLock( lock );
    242242
    243     assert( tor != NULL );
    244     assert( setme != NULL );
     243    assert( tor );
     244    assert( setme );
    245245    assert( pieceIndex < tor->info.pieceCount );
    246246
  • trunk/libtransmission/list.c

    r4404 r6425  
    3838        tr_list *node = *list;
    3939        *list = (*list)->next;
    40         if( data_free_func != NULL )
     40        if( data_free_func )
    4141            data_free_func( node->data );
    4242        node_free( node );
     
    126126{
    127127    void * ret = NULL;
    128     if( *list != NULL )
     128    if( *list )
    129129    {
    130130        ret = (*list)->data;
     
    162162tr_list_foreach( tr_list * list, TrListForeachFunc func )
    163163{
    164     while( list != NULL ) {
     164    while( list ) {
    165165        func( list->data );
    166166        list = list->next;
     
    172172{
    173173    int size = 0;
    174     while( list != NULL ) {
     174    while( list ) {
    175175        ++size;
    176176        list = list->next;
  • trunk/libtransmission/makemeta.c

    r6334 r6425  
    263263    assert( b->abortFlag || !totalRemain );
    264264
    265     if( fp != NULL )
     265    if( fp )
    266266        fclose( fp );
    267267
     
    432432        tr_lock * lock = getQueueLock ( handle );
    433433        tr_lockLock( lock );
    434         if( queue != NULL ) {
     434        if( queue ) {
    435435            builder = queue;
    436436            queue = queue->nextBuilder;
  • trunk/libtransmission/peer-io.c

    r6415 r6425  
    8181{
    8282    tr_peerIo * c = (tr_peerIo *) userData;
    83     if( c->didWrite != NULL )
    84         (*c->didWrite)( e, c->userData );
     83    if( c->didWrite )
     84        c->didWrite( e, c->userData );
    8585}
    8686
     
    9999    while( !done )
    100100    {
    101         const int ret = (*c->canRead)( e, c->userData );
     101        const int ret = c->canRead( e, c->userData );
    102102
    103103        switch( ret )
     
    119119{
    120120    tr_peerIo * c = userData;
    121     if( c->gotError != NULL )
    122         (*c->gotError)( e, what, c->userData );
     121    if( c->gotError )
     122        c->gotError( e, what, c->userData );
    123123}
    124124
     
    169169                      int                     socket )
    170170{
    171     assert( handle != NULL );
    172     assert( in_addr != NULL );
     171    assert( handle );
     172    assert( in_addr );
    173173    assert( socket >= 0 );
    174174
     
    186186    int socket;
    187187
    188     assert( handle != NULL );
    189     assert( in_addr != NULL );
     188    assert( handle );
     189    assert( in_addr );
    190190    assert( port >= 0 );
    191     assert( torrentHash != NULL );
     191    assert( torrentHash );
    192192
    193193    socket = tr_netOpenTCP( in_addr, port, 0 );
     
    212212tr_peerIoFree( tr_peerIo * io )
    213213{
    214     if( io != NULL )
     214    if( io )
    215215    {
    216216        io->canRead = NULL;
     
    224224tr_peerIoGetHandle( tr_peerIo * io )
    225225{
    226     assert( io != NULL );
    227     assert( io->handle != NULL );
     226    assert( io );
     227    assert( io->handle );
    228228
    229229    return io->handle;
     
    233233tr_peerIoGetAddress( const tr_peerIo * io, uint16_t * port )
    234234{
    235     assert( io != NULL );
    236 
    237     if( port != NULL )
     235    assert( io );
     236
     237    if( port )
    238238       *port = io->port;
    239239
     
    330330                         const uint8_t * hash )
    331331{
    332     assert( io != NULL );
     332    assert( io );
    333333
    334334    tr_cryptoSetTorrentHash( io->crypto, hash );
     
    338338tr_peerIoGetTorrentHash( tr_peerIo * io )
    339339{
    340     assert( io != NULL );
    341     assert( io->crypto != NULL );
     340    assert( io );
     341    assert( io->crypto );
    342342
    343343    return tr_cryptoGetTorrentHash( io->crypto );
     
    347347tr_peerIoHasTorrentHash( const tr_peerIo * io )
    348348{
    349     assert( io != NULL );
    350     assert( io->crypto != NULL );
     349    assert( io );
     350    assert( io->crypto );
    351351
    352352    return tr_cryptoHasTorrentHash( io->crypto );
     
    361361                     const uint8_t * peer_id )
    362362{
    363     assert( io != NULL );
     363    assert( io );
    364364
    365365    if(( io->peerIdIsSet = peer_id != NULL ))
     
    372372tr_peerIoGetPeersId( const tr_peerIo * io )
    373373{
    374     assert( io != NULL );
     374    assert( io );
    375375    assert( io->peerIdIsSet );
    376376
     
    385385tr_peerIoEnableLTEP( tr_peerIo * io, int flag )
    386386{
    387     assert( io != NULL );
     387    assert( io );
    388388    assert( flag==0 || flag==1 );
    389389   
     
    394394tr_peerIoEnableFEXT( tr_peerIo * io, int flag )
    395395{
    396     assert( io != NULL );
     396    assert( io );
    397397    assert( flag==0 || flag==1 );
    398398   
     
    403403tr_peerIoSupportsLTEP( const tr_peerIo * io )
    404404{
    405     assert( io != NULL );
     405    assert( io );
    406406   
    407407    return io->extendedProtocolSupported;
     
    411411tr_peerIoSupportsFEXT( const tr_peerIo * io )
    412412{
    413     assert( io != NULL );
     413    assert( io );
    414414   
    415415    return io->fastPeersSupported;
     
    457457                        int         encryptionMode )
    458458{
    459     assert( io != NULL );
     459    assert( io );
    460460    assert( encryptionMode==PEER_ENCRYPTION_NONE || encryptionMode==PEER_ENCRYPTION_RC4 );
    461461
  • trunk/libtransmission/peer-mgr.c

    r6423 r6425  
    249249{
    250250    assert( torrentIsLocked( torrent ) );
    251     assert( in_addr != NULL );
    252 
    253     return (tr_peer*) tr_ptrArrayFindSorted( torrent->peers,
    254                                              in_addr,
    255                                              peerCompareToAddr );
     251    assert( in_addr );
     252
     253    return tr_ptrArrayFindSorted( torrent->peers,
     254                                  in_addr,
     255                                  peerCompareToAddr );
    256256}
    257257
     
    306306peerDestructor( tr_peer * peer )
    307307{
    308     assert( peer != NULL );
    309     assert( peer->msgs != NULL );
     308    assert( peer );
     309    assert( peer->msgs );
    310310
    311311    tr_peerMsgsUnsubscribe( peer->msgs, peer->msgsTag );
     
    331331
    332332    atom = getExistingAtom( t, &peer->in_addr );
    333     assert( atom != NULL );
     333    assert( atom );
    334334    atom->time = time( NULL );
    335335
     
    351351    uint8_t hash[SHA_DIGEST_LENGTH];
    352352
    353     assert( t != NULL );
     353    assert( t );
    354354    assert( !t->isRunning );
    355     assert( t->peers != NULL );
     355    assert( t->peers );
    356356    assert( torrentIsLocked( t ) );
    357357    assert( tr_ptrArrayEmpty( t->outgoingHandshakes ) );
     
    481481
    482482    for( i=connectionCount=0; i<peerCount; ++i )
    483         if( peers[i]->msgs != NULL )
     483        if( peers[i]->msgs )
    484484            ret[connectionCount++] = peers[i];
    485485
     
    937937    tr_handshake * ours;
    938938
    939     assert( io != NULL );
     939    assert( io );
    940940    assert( isConnected==0 || isConnected==1 );
    941941
     
    947947        ours = tr_ptrArrayRemoveSorted( manager->incomingHandshakes,
    948948                                        handshake, handshakeCompare );
    949     else if( t != NULL )
     949    else if( t )
    950950        ours = tr_ptrArrayRemoveSorted( t->outgoingHandshakes,
    951951                                        handshake, handshakeCompare );
     
    953953        ours = handshake;
    954954
    955     assert( ours != NULL );
     955    assert( ours );
    956956    assert( ours == handshake );
    957957
    958     if( t != NULL )
     958    if( t )
    959959        torrentLock( t );
    960960
     
    10011001            tr_peer * peer = getExistingPeer( t, addr );
    10021002
    1003             if( peer != NULL ) /* we already have this peer */
     1003            if( peer ) /* we already have this peer */
    10041004            {
    10051005                tr_peerIoFree( io );
     
    10251025    }
    10261026
    1027     if( t != NULL )
     1027    if( t )
    10281028        torrentUnlock( t );
    10291029}
     
    11371137tr_pexCompare( const void * va, const void * vb )
    11381138{
    1139     const tr_pex * a = (const tr_pex *) va;
    1140     const tr_pex * b = (const tr_pex *) vb;
     1139    const tr_pex * a = va;
     1140    const tr_pex * b = vb;
    11411141    int i = memcmp( &a->in_addr, &b->in_addr, sizeof(struct in_addr) );
    11421142    if( i ) return i;
     
    12111211    t = getExistingTorrent( manager, torrentHash );
    12121212
    1213     assert( t != NULL );
     1213    assert( t );
    12141214    assert( ( t->isRunning != 0 ) == ( t->reconnectTimer != NULL ) );
    12151215    assert( ( t->isRunning != 0 ) == ( t->rechokeTimer != NULL ) );
     
    12751275    managerLock( manager );
    12761276
    1277     assert( tor != NULL );
     1277    assert( tor );
    12781278    assert( getExistingTorrent( manager, tor->info.hash ) == NULL );
    12791279
     
    12931293
    12941294    t = getExistingTorrent( manager, torrentHash );
    1295     assert( t != NULL );
     1295    assert( t );
    12961296    stopTorrent( t );
    12971297    tr_ptrArrayRemoveSorted( manager->torrents, t, torrentCompare );
     
    19061906                                                            mgr );
    19071907
    1908                 assert( tr_peerIoGetTorrentHash( io ) != NULL );
     1908                assert( tr_peerIoGetTorrentHash( io ) );
    19091909
    19101910                ++newConnectionsThisSecond;
  • trunk/libtransmission/peer-msgs.c

    r6412 r6425  
    337337{
    338338    FILE * fp = tr_getLog( );
    339     if( fp != NULL )
     339    if( fp )
    340340    {
    341341        va_list args;
     
    552552sendInterest( tr_peermsgs * msgs, int weAreInterested )
    553553{
    554     assert( msgs != NULL );
     554    assert( msgs );
    555555    assert( weAreInterested==0 || weAreInterested==1 );
    556556
     
    586586    const time_t fibrillationTime = time(NULL) - MIN_CHOKE_PERIOD_SEC;
    587587
    588     assert( msgs != NULL );
    589     assert( msgs->info != NULL );
     588    assert( msgs );
     589    assert( msgs->info );
    590590    assert( choke==0 || choke==1 );
    591591
     
    622622                 uint32_t      pieceIndex )
    623623{
    624     assert( msgs != NULL );
     624    assert( msgs );
    625625   
    626626    if( tr_peerIoSupportsFEXT( msgs->io ) )
     
    634634sendFastHave( tr_peermsgs * msgs, int all )
    635635{
    636     assert( msgs != NULL );
     636    assert( msgs );
    637637   
    638638    if( tr_peerIoSupportsFEXT( msgs->io ) )
     
    652652                uint32_t      length )
    653653{
    654     assert( msgs != NULL );
     654    assert( msgs );
    655655
    656656    if( tr_peerIoSupportsFEXT( msgs->io ) )
     
    685685                 uint32_t      pieceIndex)
    686686{
    687     assert( msgs != NULL );
     687    assert( msgs );
    688688   
    689689    if( tr_peerIoSupportsFEXT( msgs->io ) )
     
    851851    struct peer_request req;
    852852
    853     assert( msgs != NULL );
    854     assert( msgs->torrent != NULL );
     853    assert( msgs );
     854    assert( msgs->torrent );
    855855    assert( piece < msgs->torrent->info.pieceCount );
    856856
     
    14931493    const tr_block_index_t block = _tr_block( tor, req->index, req->offset );
    14941494
    1495     assert( msgs != NULL );
    1496     assert( req != NULL );
     1495    assert( msgs );
     1496    assert( req );
    14971497
    14981498    if( req->length != tr_torBlockCountBytes( msgs->torrent, block ) )
     
    19081908    tr_peermsgs * m;
    19091909
    1910     assert( info != NULL );
    1911     assert( info->io != NULL );
     1910    assert( info );
     1911    assert( info->io );
    19121912
    19131913    m = tr_new0( tr_peermsgs, 1 );
     
    19531953tr_peerMsgsFree( tr_peermsgs* msgs )
    19541954{
    1955     if( msgs != NULL )
     1955    if( msgs )
    19561956    {
    19571957        tr_timerFree( &msgs->pulseTimer );
  • trunk/libtransmission/ptrarray.c

    r6389 r6425  
    5757    int i;
    5858
    59     assert( t != NULL );
    60     assert( t->items != NULL );
    61     assert( func != NULL );
     59    assert( t );
     60    assert( t->items );
     61    assert( func );
    6262
    6363    for( i=0; i<t->n_items; ++i )
     
    6868tr_ptrArrayFree( tr_ptrArray * t, PtrArrayForeachFunc func )
    6969{
    70     assert( t != NULL );
    71     assert( t->items != NULL );
    72 
    73     if( func != NULL )
     70    assert( t );
     71    assert( t->items );
     72
     73    if( func )
    7474        tr_ptrArrayForeach( t, func );
    7575
     
    9494tr_ptrArrayNth( tr_ptrArray* t, int i )
    9595{
    96     assert( t != NULL  );
     96    assert( t );
    9797    assert( i >= 0 );
    9898    assert( i < t->n_items );
  • trunk/libtransmission/publish.c

    r4404 r6425  
    3636tr_publisherFree( tr_publisher_t ** p )
    3737{
    38     assert( p != NULL );
    39     assert( *p != NULL );
     38    assert( p );
     39    assert( *p );
    4040
    4141    tr_list_free( &(*p)->list, NULL );
  • trunk/libtransmission/ratecontrol.c

    r6259 r6425  
    9797    size_t bytes = 0;
    9898
    99     if( r != NULL )
     99    if( r )
    100100    {
    101101        const float cur = rateForInterval( r, SHORT_INTERVAL_MSEC );
  • trunk/libtransmission/rpc.c

    r6404 r6425  
    3434notify( tr_handle * session, int type, tr_torrent * tor )
    3535{
    36     if( session->rpc_func != NULL )
     36    if( session->rpc_func )
    3737        session->rpc_func( session, type, tor, session->rpc_func_user_data );
    3838}
  • trunk/libtransmission/session.c

    r6424 r6425  
    8484tr_sessionGetEncryption( tr_session * session )
    8585{
    86     assert( session != NULL );
     86    assert( session );
    8787
    8888    return session->encryptionMode;
     
    9292tr_sessionSetEncryption( tr_session * session, tr_encryption_mode mode )
    9393{
    94     assert( session != NULL );
     94    assert( session );
    9595    assert( mode==TR_ENCRYPTION_PREFERRED
    9696         || mode==TR_ENCRYPTION_REQUIRED
     
    393393tr_sessionGetPeerPort( const tr_handle * h )
    394394{
    395     assert( h != NULL );
     395    assert( h );
    396396    return tr_sharedGetPeerPort( h->shared );
    397397}
     
    845845                                             sizeof( struct tr_metainfo_lookup ),
    846846                                             compareHashStringToLookupEntry );
    847     if( l != NULL )
     847    if( l )
    848848    {
    849849        if( l->filename != filename )
  • trunk/libtransmission/stats.c

    r6162 r6425  
    159159{
    160160    const struct tr_stats_handle * stats = getStats( handle );
    161     assert( stats != NULL );
     161    assert( stats );
    162162    *setme = stats->single;
    163163    setme->secondsActive = time( NULL ) - stats->startTime;
     
    170170{
    171171    const struct tr_stats_handle * stats = getStats( handle );
    172     assert( stats != NULL );
     172    assert( stats );
    173173    tr_session_stats current;
    174174    tr_sessionGetStats( handle, &current );
  • trunk/libtransmission/torrent-ctor.c

    r6154 r6425  
    108108    if( ctor->isSet_metainfo ) {
    109109        tr_benc * info = tr_bencDictFindType( &ctor->metainfo, "info", TYPE_DICT );
    110         if( info != NULL ) {
     110        if( info ) {
    111111            tr_benc * name = tr_bencDictFindFirst( info, "name.utf-8", "name", NULL );
    112112            if( name == NULL )
  • trunk/libtransmission/torrent.c

    r6354 r6425  
    233233getBytePiece( const tr_info * info, uint64_t byteOffset )
    234234{
    235     assert( info != NULL );
     235    assert( info );
    236236    assert( info->pieceSize != 0 );
    237237
     
    245245    uint64_t firstByte, lastByte;
    246246
    247     assert( info != NULL );
     247    assert( info );
    248248    assert( fileIndex < info->fileCount );
    249249
     
    310310    tr_info * inf = &tor->info;
    311311
    312     assert( inf != NULL );
     312    assert( inf );
    313313
    314314    for( ff=0; ff<inf->fileCount; ++ff ) {
     
    328328    int tier;
    329329
    330     assert( tor != NULL );
     330    assert( tor );
    331331    assert( ( 0 <= pos ) && ( pos < tor->info.trackerCount ) );
    332332
     
    633633tr_torrentCanManualUpdate( const tr_torrent * tor )
    634634{
    635     return ( tor != NULL )
     635    return ( tor )
    636636        && ( tor->isRunning )
    637637        && ( tr_trackerCanManualAnnounce( tor->tracker ) );
     
    805805    uint64_t haveBytes = 0;
    806806
    807     assert( tor != NULL );
     807    assert( tor );
    808808    assert( fileIndex < tor->info.fileCount );
    809809    assert( file->offset + file->length <= tor->info.totalSize );
     
    880880    tr_peer_stat * ret = NULL;
    881881
    882     if( tor != NULL )
     882    if( tor )
    883883        ret = tr_peerMgrPeerStats( tor->handle->peerMgr,
    884884                                   tor->info.hash, peerCount );
     
    930930    tr_torrentLock( tor );
    931931
    932     assert( tor != NULL );
     932    assert( tor );
    933933    assert( pieceIndex < tor->info.pieceCount );
    934934
     
    952952    tr_info * inf = &tor->info;
    953953
    954     assert( tor != NULL );
     954    assert( tor );
    955955    assert( !tor->isRunning );
    956956
     
    11611161fireStatusChange( tr_torrent * tor, cp_status_t status )
    11621162{
    1163     assert( tor != NULL );
     1163    assert( tor );
    11641164    assert( status==TR_CP_INCOMPLETE || status==TR_CP_DONE || status==TR_CP_COMPLETE );
    11651165
    1166     if( tor->status_func != NULL )
    1167         (tor->status_func)( tor, status, tor->status_func_user_data );
     1166    if( tor->status_func )
     1167        tor->status_func( tor, status, tor->status_func_user_data );
    11681168}
    11691169
     
    11731173                             void                   * user_data )
    11741174{
    1175     assert( tor != NULL );
     1175    assert( tor );
    11761176    tor->status_func = func;
    11771177    tor->status_func_user_data = user_data;
     
    12381238    tr_file * file;
    12391239
    1240     assert( tor != NULL );
     1240    assert( tor );
    12411241    assert( fileIndex < tor->info.fileCount );
    12421242    assert( priority==TR_PRI_LOW || priority==TR_PRI_NORMAL || priority==TR_PRI_HIGH );
     
    12701270
    12711271    tr_torrentLock( tor );
    1272     assert( tor != NULL );
     1272    assert( tor );
    12731273    assert( file < tor->info.fileCount );
    12741274    ret = tor->info.files[file].priority;
  • trunk/libtransmission/utils.c

    r6420 r6425  
    177177{
    178178    FILE * fp = tr_getLog( );
    179     if( fp != NULL )
     179    if( fp )
    180180    {
    181181        va_list args;
     
    653653        out = tr_strdup( in );
    654654    }
    655     else if( in != NULL )
     655    else if( in )
    656656    {
    657657        out = tr_malloc( len+1 );
     
    824824tr_bitfieldAdd( tr_bitfield  * bitfield, size_t nth )
    825825{
    826     assert( bitfield != NULL );
    827     assert( bitfield->bits != NULL );
     826    assert( bitfield );
     827    assert( bitfield->bits );
    828828
    829829    if( nth >= bitfield->bitCount )
     
    851851                size_t          nth )
    852852{
    853     assert( bitfield != NULL );
    854     assert( bitfield->bits != NULL );
     853    assert( bitfield );
     854    assert( bitfield->bits );
    855855
    856856    if( nth >= bitfield->bitCount )
     
    998998    size_t n = siz;
    999999
    1000     assert( s != NULL );
    1001     assert( d != NULL );
     1000    assert( s );
     1001    assert( d );
    10021002
    10031003    /* Copy as many bytes as will fit */
  • trunk/libtransmission/verify.c

    r5843 r6425  
    3737               tr_verify_done_cb     verify_done_cb )
    3838{
    39     if( verify_done_cb != NULL )
    40         (*verify_done_cb)( torrent );
     39    if( verify_done_cb )
     40        verify_done_cb( torrent );
    4141}
    4242
Note: See TracChangeset for help on using the changeset viewer.