From cb567b5ea68f1e8d0429b7f9d668fd43d92371bf Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Thu, 25 Jun 2015 17:00:40 +0300 Subject: [PATCH] (vfs_s_print_stats): get rid of static variables. Signed-off-by: Andrew Borodin --- lib/vfs/direntry.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/vfs/direntry.c b/lib/vfs/direntry.c index 6d454a308..c3ac83de7 100644 --- a/lib/vfs/direntry.c +++ b/lib/vfs/direntry.c @@ -696,22 +696,13 @@ static void vfs_s_print_stats (const char *fs_name, const char *action, 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) - 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, _("bytes transferred")); else - vfs_print_message (i18n_transf_format, fs_name, action, file_name, (uintmax_t) have, - _("bytes transferred")); + vfs_print_message (_("%s: %s: %s %" PRIuMAX " %s"), fs_name, action, file_name, + (uintmax_t) have, _("bytes transferred")); } /* --------------------------------------------------------------------------------------------- */