IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34940


Ignore:
Timestamp:
Jan 16, 2013, 3:37:29 PM (14 years ago)
Author:
Serge CHASTEL
Message:

neb-df: Division by 0 bug fix improvement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20121218/Nebulous/bin/neb-df

    r34924 r34940  
    6161    $total_used     += $used;
    6262    my $available   = $total - $used;
    63     my $usedper     = ($used / ($total+1)) * 100;
     63    if ($total == 0) {
     64        # Avoid dividing by 0
     65        $total = 1;
     66    }
     67    my $usedper     = ($used / $total) * 100;
    6468    my $mountpoint  = $vol{mountpoint};
    6569
Note: See TracChangeset for help on using the changeset viewer.