From 4ea2557fed931b4cb085f96b304caac6b65656fd Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 17 Jan 2010 16:20:28 +0000 Subject: [PATCH] using ABS is better than multiplying by -1 --- macosx/Torrent.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 7a801e482..4748fcc26 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -1449,7 +1449,7 @@ int trashDataFile(const char * filename) - (NSInteger) stalledMinutes { - time_t start = fStat->startDate; + const time_t start = fStat->startDate; if (start == 0) return -1; @@ -1457,7 +1457,8 @@ int trashDataFile(const char * filename) * activity = [self dateActivity]; NSDate * laterDate = activity ? [started laterDate: activity] : started; - return -1 * [laterDate timeIntervalSinceNow] / 60; + + return ABS([laterDate timeIntervalSinceNow]) / 60; } - (BOOL) isStalled -- 2.40.0