1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: substract integers

Instead of doing float arithmetic, do integer math first and
convert result to float.
This commit is contained in:
Zdenek Kabelac 2016-05-27 10:39:25 +02:00
parent 1c07e67462
commit cb49ceeaba

View File

@ -153,10 +153,10 @@ progress_t poll_merge_progress(struct cmd_context *cmd,
if (parms->progress_display)
log_print_unless_silent("%s: %s: %.2f%%", lv->name, parms->progress_title,
100.0 - dm_percent_to_float(percent));
dm_percent_to_float(DM_PERCENT_100 - percent));
else
log_verbose("%s: %s: %.2f%%", lv->name, parms->progress_title,
100.0 - dm_percent_to_float(percent));
dm_percent_to_float(DM_PERCENT_100 - percent));
if (percent == DM_PERCENT_0)
return PROGRESS_FINISHED_ALL;