Small iterator change in libtransmission by oleo.

This commit is contained in:
Mitchell Livingston 2006-08-09 22:53:27 +00:00
parent cbaa4aec74
commit af77d3d170
1 changed files with 3 additions and 2 deletions

View File

@ -386,10 +386,11 @@ int tr_torrentCount( tr_handle_t * h )
void tr_torrentIterate( tr_handle_t * h, tr_callback_t func, void * d )
{
tr_torrent_t * tor;
tr_torrent_t * tor, * next;
for( tor = h->torrentList; tor; tor = tor->next )
for( tor = h->torrentList; tor; tor = next )
{
next = tor->next;
func( tor, d );
}
}