Ignore:
Timestamp:
Apr 16, 2009, 7:14:37 PM (13 years ago)
Author:
charles
Message:

(trunk libT) fix long-standing wart of a few public API calls returning strdup'ed char*, rather than a const char* like all the others

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpc-server.c

    r8242 r8246  
    644644}
    645645
    646 char*
     646const char*
    647647tr_rpcGetWhitelist( const tr_rpc_server * server )
    648648{
    649     return tr_strdup( server->whitelistStr ? server->whitelistStr : "" );
     649    return server->whitelistStr ? server->whitelistStr : "";
    650650}
    651651
     
    676676}
    677677
    678 char*
     678const char*
    679679tr_rpcGetUsername( const tr_rpc_server * server )
    680680{
    681     return tr_strdup( server->username ? server->username : "" );
     681    return server->username ? server->username : "";
    682682}
    683683
     
    694694}
    695695
    696 char*
     696const char*
    697697tr_rpcGetPassword( const tr_rpc_server * server )
    698698{
    699     return tr_strdup( server->password ? server->password : "" );
     699    return server->password ? server->password : "" ;
    700700}
    701701
Note: See TracChangeset for help on using the changeset viewer.