Changeset 12032


Ignore:
Timestamp:
Feb 24, 2011, 3:38:58 PM (11 years ago)
Author:
jordan
Message:

(2.2x) backport r11881 for #4019 "kill useless casts" -- patch from jlouis

Location:
branches/2.2x
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2x/daemon/remote.c

    r12023 r12032  
    22762276            default:
    22772277            {
    2278                 fprintf( stderr, "got opt [%d]\n", (int)c );
     2278                fprintf( stderr, "got opt [%d]\n", c );
    22792279                showUsage( );
    22802280                break;
  • branches/2.2x/libtransmission/fdlimit.c

    r12023 r12032  
    794794    gFd->public_socket_limit = socket_limit;
    795795
    796     tr_dbg( "socket limit is %d", (int)gFd->socket_limit );
     796    tr_dbg( "socket limit is %d", gFd->socket_limit );
    797797}
    798798
  • branches/2.2x/libtransmission/handshake.c

    r11709 r12032  
    266266
    267267    dbgmsg( handshake, "payload: need %d, got %zu",
    268             (int)HANDSHAKE_SIZE, evbuffer_get_length( inbuf ) );
     268            HANDSHAKE_SIZE, evbuffer_get_length( inbuf ) );
    269269
    270270    if( evbuffer_get_length( inbuf ) < HANDSHAKE_SIZE )
     
    609609
    610610    dbgmsg( handshake, "payload: need %d, got %zu",
    611             (int)INCOMING_HANDSHAKE_LEN, evbuffer_get_length( inbuf ) );
     611            INCOMING_HANDSHAKE_LEN, evbuffer_get_length( inbuf ) );
    612612
    613613    if( evbuffer_get_length( inbuf ) < INCOMING_HANDSHAKE_LEN )
     
    758758
    759759    dbgmsg( handshake, "in readYa... need %d, have %zu",
    760             (int)KEY_LEN, evbuffer_get_length( inbuf ) );
     760            KEY_LEN, evbuffer_get_length( inbuf ) );
    761761    if( evbuffer_get_length( inbuf ) < KEY_LEN )
    762762        return READ_LATER;
  • branches/2.2x/libtransmission/json.c

    r11709 r12032  
    9292        case JSON_T_FLOAT:
    9393            data->hasContent = TRUE;
    94             tr_bencInitReal( getNode( data ), (double)value->vu.float_value );
     94            tr_bencInitReal( getNode( data ), value->vu.float_value );
    9595            break;
    9696
  • branches/2.2x/libtransmission/peer-mgr.c

    r12030 r12032  
    810810    missing = tr_cpMissingBlocksInPiece( &tor->completion, a->index );
    811811    pending = a->requestCount;
    812     ia = missing > pending ? missing - pending : (int)(tor->blockCountInPiece + pending);
     812    ia = missing > pending ? missing - pending : (tor->blockCountInPiece + pending);
    813813    missing = tr_cpMissingBlocksInPiece( &tor->completion, b->index );
    814814    pending = b->requestCount;
    815     ib = missing > pending ? missing - pending : (int)(tor->blockCountInPiece + pending);
     815    ib = missing > pending ? missing - pending : (tor->blockCountInPiece + pending);
    816816    if( ia < ib ) return -1;
    817817    if( ia > ib ) return 1;
  • branches/2.2x/libtransmission/utils.c

    r11798 r12032  
    202202    tr_localtime_r( &seconds, &now_tm );
    203203    strftime( tmp, sizeof( tmp ), "%H:%M:%S", &now_tm );
    204     milliseconds = (int)( tv.tv_usec / 1000 );
     204    milliseconds = tv.tv_usec / 1000;
    205205    tr_snprintf( buf, buflen, "%s.%03d", tmp, milliseconds );
    206206
  • branches/2.2x/libtransmission/utils.h

    r11775 r12032  
    324324
    325325#define tr_new( struct_type, n_structs )           \
    326     ( (struct_type *) tr_malloc ( ( (size_t) sizeof ( struct_type ) ) * ( ( size_t) ( n_structs ) ) ) )
     326    ( (struct_type *) tr_malloc ( sizeof ( struct_type ) * ( ( size_t) ( n_structs ) ) ) )
    327327
    328328#define tr_new0( struct_type, n_structs )          \
    329     ( (struct_type *) tr_malloc0 ( ( (size_t) sizeof ( struct_type ) ) * ( ( size_t) ( n_structs ) ) ) )
     329    ( (struct_type *) tr_malloc0 ( sizeof ( struct_type ) * ( ( size_t) ( n_structs ) ) ) )
    330330
    331331#define tr_renew( struct_type, mem, n_structs )    \
    332     ( (struct_type *) realloc ( ( mem ), ( (size_t) sizeof ( struct_type ) ) * ( ( size_t) ( n_structs ) ) ) )
     332    ( (struct_type *) realloc ( ( mem ), sizeof ( struct_type ) * ( ( size_t) ( n_structs ) ) ) )
    333333
    334334void* tr_valloc( size_t bufLen );
Note: See TracChangeset for help on using the changeset viewer.