unix.c (calc_percent): Make sure that we don't take a floating
exception if the max value is zero. (should normally never happen,
but...)
+2000-08-07 <tytso@snap.thunk.org>
+
+ * unix.c (calc_percent): Make sure that we don't take a floating
+ exception if the max value is zero. (should normally
+ never happen, but...)
+
2000-07-13 <tytso@valinux.com>
* Release of E2fsprogs 1.19
if (pass <= 0)
return 0.0;
- if (pass > tbl->max_pass)
+ if (pass > tbl->max_pass || max == 0)
return 100.0;
percent = ((float) curr) / ((float) max);
return ((percent * (tbl->table[pass] - tbl->table[pass-1]))