diff options
Diffstat (limited to 'ubi-utils/ubiformat.c')
-rw-r--r-- | ubi-utils/ubiformat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ubi-utils/ubiformat.c b/ubi-utils/ubiformat.c index ef0378a..c38b9b4 100644 --- a/ubi-utils/ubiformat.c +++ b/ubi-utils/ubiformat.c @@ -844,7 +844,7 @@ int main(int argc, char * const argv[]) } if (!args.override_ec && si->empty_cnt < si->good_cnt) { - int percent = ((double)si->ok_cnt)/si->good_cnt * 100; + int percent = (si->ok_cnt * 100) / si->good_cnt; /* * Make sure the majority of eraseblocks have valid |