Ignore:
Timestamp:
Jul 1, 2010, 5:14:34 AM (11 years ago)
Author:
charles
Message:

(trunk libT) fix more issues found by -Wconversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r10916 r10918  
    867867
    868868double
    869 tr_getRatio( double numerator, double denominator )
     869tr_getRatio( uint64_t numerator, uint64_t denominator )
    870870{
    871871    double ratio;
    872872
    873     if( fabs(denominator) > 0.01 )
    874         ratio = numerator / denominator;
    875     else if( fabs(numerator) > 0.01 )
     873    if( denominator > 0 )
     874        ratio = numerator / (double)denominator;
     875    else if( numerator > 0 )
    876876        ratio = TR_RATIO_INF;
    877877    else
Note: See TracChangeset for help on using the changeset viewer.