(vfs_s_print_stats): get rid of static variables.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2015-06-25 17:00:40 +03:00 committed by Slava Zanko
parent 69fb6b91be
commit cb567b5ea6

View File

@ -696,22 +696,13 @@ static void
vfs_s_print_stats (const char *fs_name, const char *action, vfs_s_print_stats (const char *fs_name, const char *action,
const char *file_name, off_t have, off_t need) const char *file_name, off_t have, off_t need)
{ {
static const char *i18n_percent_transf_format = NULL;
static const char *i18n_transf_format = NULL;
if (i18n_percent_transf_format == NULL)
{
i18n_percent_transf_format = "%s: %s: %s %3d%% (%" PRIuMAX " %s";
i18n_transf_format = "%s: %s: %s %" PRIuMAX " %s";
}
if (need) if (need)
vfs_print_message (i18n_percent_transf_format, fs_name, action, vfs_print_message (_("%s: %s: %s %3d%% %" PRIuMAX " %s"), fs_name, action,
file_name, (int) ((double) have * 100 / need), (uintmax_t) have, file_name, (int) ((double) have * 100 / need), (uintmax_t) have,
_("bytes transferred")); _("bytes transferred"));
else else
vfs_print_message (i18n_transf_format, fs_name, action, file_name, (uintmax_t) have, vfs_print_message (_("%s: %s: %s %" PRIuMAX " %s"), fs_name, action, file_name,
_("bytes transferred")); (uintmax_t) have, _("bytes transferred"));
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */