From 5cdd717e224a2c74b31a53e40ac5325d675a435f Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 17 Dec 2006 17:23:21 +0000 Subject: [PATCH] use existing variable and remove redundant call --- libtransmission/transmission.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libtransmission/transmission.c b/libtransmission/transmission.c index 99012655d..e7079ed91 100644 --- a/libtransmission/transmission.c +++ b/libtransmission/transmission.c @@ -476,11 +476,11 @@ tr_stat_t * tr_torrentStat( tr_torrent_t * tor ) sizeof( s->trackerError ) ); s->cannotConnect = tr_trackerCannotConnect( tc ); - if( tor->tracker ) + if( tc ) { - s->trackerAddress = tr_trackerAddress( tor->tracker ); - s->trackerPort = tr_trackerPort( tor->tracker ); - s->trackerAnnounce = tr_trackerAnnounce( tor->tracker ); + s->trackerAddress = tr_trackerAddress( tc ); + s->trackerPort = tr_trackerPort( tc ); + s->trackerAnnounce = tr_trackerAnnounce( tc ); } else { @@ -535,8 +535,7 @@ tr_stat_t * tr_torrentStat( tr_torrent_t * tor ) s->seeders = tr_trackerSeeders( tc ); s->leechers = tr_trackerLeechers( tc ); - s->completedFromTracker = tr_trackerDownloaded( tor->tracker ); - s->completedFromTracker = tr_trackerDownloaded(tor->tracker); + s->completedFromTracker = tr_trackerDownloaded( tc ); s->swarmspeed = tr_rcRate( tor->swarmspeed );