mirror of
https://github.com/transmission/transmission
synced 2025-02-25 07:22:38 +00:00
minor tweak: tr_core_load() should return void, not int
This commit is contained in:
parent
f99fe83e16
commit
fee807cd57
2 changed files with 6 additions and 9 deletions
|
@ -912,13 +912,13 @@ tr_core_add_torrent( TrCore * self,
|
|||
g_free( trackers );
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
tr_core_load( TrCore * self, gboolean forcePaused )
|
||||
{
|
||||
int i;
|
||||
int count = 0;
|
||||
tr_torrent ** torrents;
|
||||
tr_ctor * ctor;
|
||||
tr_torrent ** torrents;
|
||||
int count = 0;
|
||||
|
||||
ctor = tr_ctorNew( tr_core_session( self ) );
|
||||
if( forcePaused )
|
||||
|
@ -927,13 +927,11 @@ tr_core_load( TrCore * self, gboolean forcePaused )
|
|||
pref_int_get( TR_PREFS_KEY_PEER_LIMIT_TORRENT ) );
|
||||
|
||||
torrents = tr_sessionLoadTorrents ( tr_core_session( self ), ctor, &count );
|
||||
for( i = 0; i < count; ++i )
|
||||
for( i=0; i<count; ++i )
|
||||
tr_core_add_torrent( self, tr_torrent_new_preexisting( torrents[i] ), FALSE );
|
||||
|
||||
tr_free( torrents );
|
||||
tr_ctorFree( ctor );
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/***
|
||||
|
|
|
@ -95,8 +95,7 @@ size_t tr_core_get_torrent_count( TrCore * self );
|
|||
* Load saved state and return number of torrents added.
|
||||
* May trigger one or more "error" signals with TR_CORE_ERR_ADD_TORRENT
|
||||
*/
|
||||
int tr_core_load( TrCore * self,
|
||||
gboolean forcepaused );
|
||||
void tr_core_load( TrCore * self, gboolean forcepaused );
|
||||
|
||||
/**
|
||||
* Add a list of torrents.
|
||||
|
|
Loading…
Reference in a new issue