From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-we0-f177.google.com ([74.125.82.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TQ2hx-00015T-FK for barebox@lists.infradead.org; Sun, 21 Oct 2012 21:05:17 +0000 Received: by mail-we0-f177.google.com with SMTP id u50so1128472wey.36 for ; Sun, 21 Oct 2012 14:05:14 -0700 (PDT) From: Alexander Aring Date: Sun, 21 Oct 2012 22:59:06 +0200 Message-Id: <1350853147-9233-1-git-send-email-alex.aring@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] progressbar: use __stringify in format string To: barebox@lists.infradead.org Use stringify in format string for HASH_PER_LINE. Signed-off-by: Alexander Aring --- 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 d958a44..bc067ea 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"); } -- 1.7.12.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox