mirror of
https://github.com/transmission/transmission
synced 2025-02-22 06:00:41 +00:00
using ABS is better than multiplying by -1
This commit is contained in:
parent
45933314c5
commit
4ea2557fed
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue