Changeset 11825


Ignore:
Timestamp:
Feb 3, 2011, 10:53:02 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) minor futzing: remove unnecessary "assert( tr_isTorrent( tor ) );" calls

Remove these calls from private functions whose callers have already asserted the same thing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r11818 r11825  
    485485tr_torrentClearError( tr_torrent * tor )
    486486{
    487     assert( tr_isTorrent( tor ) );
    488 
    489487    tor->error = TR_STAT_OK;
    490488    tor->errorString[0] = '\0';
     
    14821480tr_torrentResetTransferStats( tr_torrent * tor )
    14831481{
    1484     assert( tr_isTorrent( tor ) );
    1485 
    14861482    tr_torrentLock( tor );
    14871483
     
    15231519    tr_info *    inf = &tor->info;
    15241520
    1525     assert( tr_isTorrent( tor ) );
    15261521    assert( !tor->isRunning );
    15271522
     
    16161611torrentStart( tr_torrent * tor )
    16171612{
    1618     assert( tr_isTorrent( tor ) );
    1619 
    16201613    /* already running... */
    16211614    if( tor->isRunning )
     
    16901683    tr_torrent * tor = vtor;
    16911684
    1692     assert( tr_isTorrent( tor ) );
    16931685    tr_sessionLock( tor->session );
    16941686
     
    18831875                        tr_bool            wasRunning )
    18841876{
    1885     assert( tr_isTorrent( tor ) );
    18861877    assert( ( status == TR_LEECH )
    18871878         || ( status == TR_SEED )
     
    19551946    char timeStr[128];
    19561947    const time_t now = tr_time( );
    1957 
    1958     assert( tr_isTorrent( tor ) );
    19591948
    19601949    tr_strlcpy( timeStr, ctime( &now ), sizeof( timeStr ) );
     
    21422131setFileDND( tr_torrent * tor, tr_file_index_t fileIndex, int doDownload )
    21432132{
    2144     tr_file *        file;
    21452133    const int8_t     dnd = !doDownload;
    21462134    tr_piece_index_t firstPiece;
     
    21492137    int8_t           lastPieceDND;
    21502138    tr_file_index_t  i;
    2151 
    2152     assert( tr_isTorrent( tor ) );
    2153 
    2154     file = &tor->info.files[fileIndex];
     2139    tr_file *        file = &tor->info.files[fileIndex];
     2140
    21552141    file->dnd = dnd;
    21562142    firstPiece = file->firstPiece;
     
    26732659               tr_ptrArray      * dirtyFolders )
    26742660{
    2675     int i;
    26762661    struct stat sb;
    2677     char * buf;
    2678 
    2679     assert( tr_isTorrent( tor ) );
    2680 
    2681     buf = tr_buildPath( dir, base, NULL );
    2682     i = stat( buf, &sb );
     2662    char * buf = tr_buildPath( dir, base, NULL );
     2663    int i = stat( buf, &sb );
     2664
    26832665    if( !i )
    26842666    {
     
    27292711    char * root = tr_buildPath( tor->currentDir, tmp, NULL );
    27302712
    2731     assert( tr_isTorrent( tor ) );
    2732 
    27332713    for( f=0; f<tor->info.fileCount; ++f ) {
    27342714        tr_ptrArrayInsertSorted( &torrentFiles, tr_strdup( tor->info.files[f].name ), vstrcmp );
Note: See TracChangeset for help on using the changeset viewer.