Changeset 2391


Ignore:
Timestamp:
Jul 18, 2007, 5:25:42 PM (16 years ago)
Author:
joshe
Message:

Include trcompat.h for asprintf()
Don't mix function and non function pointers without casting.
Replace a couple bzero()s with memset()s.
Remove a stray ;
Include a missing header.

Location:
trunk/libtransmission
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/clients.c

    r2383 r2391  
    2424
    2525#include <ctype.h> /* isprint */
     26
    2627#include "transmission.h"
     28#include "trcompat.h"
    2729
    2830static int charToInt( char character );
  • trunk/libtransmission/http.c

    r2343 r2391  
    3232#include "http.h"
    3333#include "net.h"
     34#include "trcompat.h"
    3435
    3536#define HTTP_PORT               80      /* default http port 80 */
  • trunk/libtransmission/ipcparse.c

    r2369 r2391  
    241241    {
    242242        RB_INIT( &tree->msgs );
    243         tree->def = NULL;
     243        tree->def = (trd_msgfunc) NULL;
    244244    }
    245245
     
    255255    assert( IPC_MSG_VERSION != id );
    256256
    257     bzero( &key, sizeof key );
     257    memset( &key, 0, sizeof key );
    258258    key.id = id;
    259259    entry = RB_FIND( functree, &tree->msgs, &key );
     
    11151115    if( NULL != msg && msg->minvers <= info->vers )
    11161116    {
    1117         bzero( &key, sizeof key );
     1117        memset( &key, 0, sizeof key );
    11181118        key.id  = msg->id;
    11191119        handler = RB_FIND( functree, &info->funcs->msgs, &key );
     
    11631163    assert( MSGVALID( id ) );
    11641164
    1165     bzero( &key, sizeof key );
     1165    memset( &key, 0, sizeof key );
    11661166    key.id = id;
    11671167    return ( NULL != RB_FIND( functree, &info->funcs->msgs, &key ) );
     
    12191219    }
    12201220
    1221     bzero( &key, sizeof key );
     1221    memset( &key, 0, sizeof key );
    12221222    for( jj = 0; list->val.l.count > jj; jj++ )
    12231223    {
     
    13031303    }
    13041304
    1305     bzero( &key, sizeof key );
     1305    memset( &key, 0, sizeof key );
    13061306    key.name = name;
    13071307    return RB_FIND( msgtree, &tree, &key );
  • trunk/libtransmission/peertree.h

    r2339 r2391  
    4747}
    4848
    49 RB_GENERATE_STATIC( tr_peertree_s, tr_peertree_entry_s, magic, peertreekeycmp );
     49RB_GENERATE_STATIC( tr_peertree_s, tr_peertree_entry_s, magic, peertreekeycmp )
    5050
    5151static int
  • trunk/libtransmission/platform.c

    r2343 r2391  
    228228    resume_thread( t->thread );
    229229#else
    230     pthread_create( &t->thread, NULL, (void *) ThreadFunc, t );
     230    pthread_create( &t->thread, NULL, (void * (*) (void *)) ThreadFunc, t );
    231231#endif
    232232}
  • trunk/libtransmission/upnp.c

    r2358 r2391  
    2727#include <netinet/in.h>
    2828#include <arpa/inet.h>
     29#include <limits.h>
    2930#include <stdarg.h>
    3031
     
    3233#include "http.h"
    3334#include "net.h"
     35#include "trcompat.h"
    3436#include "upnp.h"
    3537#include "xml.h"
Note: See TracChangeset for help on using the changeset viewer.