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:
parent
1c07e67462
commit
cb49ceeaba
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user