From 4d5fa6ca5c86bccc934ac8483167aa4f93f8601f Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Sun, 21 Oct 2012 22:59:06 +0200 Subject: [PATCH] progressbar: use __stringify in format string Use stringify in format string for HASH_PER_LINE. Signed-off-by: Alexander Aring Signed-off-by: Sascha Hauer --- lib/show_progress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/show_progress.c b/lib/show_progress.c index d958a4468..bc067eac5 100644 --- a/lib/show_progress.c +++ b/lib/show_progress.c @@ -20,6 +20,7 @@ #include #include #include +#include #define HASHES_PER_LINE 65 @@ -56,7 +57,7 @@ void init_progression_bar(int max) progress_max = max; spin = 0; if (progress_max) - printf("\t[%65s]\r\t[", ""); + printf("\t[%"__stringify(HASHES_PER_LINE)"s]\r\t[", ""); else printf("\t"); }