minor tweak: tr_core_load() should return void, not int

This commit is contained in:
Charles Kerr 2010-12-21 16:49:57 +00:00
parent f99fe83e16
commit fee807cd57
2 changed files with 6 additions and 9 deletions

View File

@ -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;
int i;
tr_ctor * ctor;
tr_torrent ** torrents;
tr_ctor * ctor;
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;
}
/***

View File

@ -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.