Changeset 12077


Ignore:
Timestamp:
Mar 3, 2011, 9:51:11 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) a bit of futzing: remove a few more unnecessary casts from void*

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tr-udp.c

    r11958 r12077  
    187187event_callback(int s, short type UNUSED, void *sv)
    188188{
    189     tr_session *ss = (tr_session*)sv;
     189    tr_session *ss = sv;
    190190    unsigned char *buf;
    191191    struct sockaddr_storage from;
  • trunk/libtransmission/tr-utp.c

    r11971 r12077  
    102102incoming(void *closure, struct UTPSocket *s)
    103103{
    104     tr_session *ss = (tr_session*)closure;
     104    tr_session *ss = closure;
    105105    struct sockaddr_storage from_storage;
    106106    struct sockaddr *from = (struct sockaddr*)&from_storage;
     
    138138             const struct sockaddr *to, socklen_t tolen)
    139139{
    140     tr_session *ss = (tr_session*)closure;
     140    tr_session *ss = closure;
    141141
    142142    if(to->sa_family == AF_INET && ss->udp_socket)
  • trunk/libtransmission/utils.c

    r11881 r12077  
    361361
    362362void
    363 tr_set_compare( const void * va,
    364                 size_t aCount,
    365                 const void * vb,
    366                 size_t bCount,
     363tr_set_compare( const void * va, size_t aCount,
     364                const void * vb, size_t bCount,
    367365                int compare( const void * a, const void * b ),
    368366                size_t elementSize,
     
    372370                void * userData )
    373371{
    374     const uint8_t * a = (const uint8_t *) va;
    375     const uint8_t * b = (const uint8_t *) vb;
     372    const uint8_t * a = va;
     373    const uint8_t * b = vb;
    376374    const uint8_t * aend = a + elementSize * aCount;
    377375    const uint8_t * bend = b + elementSize * bCount;
     
    656654    while( element ) {
    657655        bufLen += strlen( element ) + 1;
    658         element = (const char*) va_arg( vl, const char* );
     656        element = va_arg( vl, const char* );
    659657    }
    660658    pch = buf = tr_new( char, bufLen );
     
    669667        pch += elementLen;
    670668        *pch++ = TR_PATH_DELIMITER;
    671         element = (const char*) va_arg( vl, const char* );
     669        element = va_arg( vl, const char* );
    672670    }
    673671    va_end( vl );
     
    12171215                           size_t         nmemb )
    12181216{
    1219     char * a = (char*) array;
     1217    char * a = array;
    12201218
    12211219    memmove( a + sizeof_element * index_to_remove,
Note: See TracChangeset for help on using the changeset viewer.