From: Sami Kerola Date: Sun, 7 Jul 2013 19:54:49 +0000 (+0100) Subject: more: use variable lenght printf field width to print blanks X-Git-Tag: v2.24-rc1~429 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9f3d0c0ff7b464d07dea530332cd0546b2c55a4;p=thirdparty%2Futil-linux.git more: use variable lenght printf field width to print blanks This makes program to run a little faster. Signed-off-by: Sami Kerola --- diff --git a/text-utils/more.c b/text-utils/more.c index 8888a083ba..3bbeede5d9 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -1058,8 +1058,7 @@ void erasep(register int col) if (!dumb && eraseln) my_putstring(eraseln); else - for (col = promptlen - col; col > 0; col--) - putchar(' '); + printf("%*s", promptlen - col, ""); } promptlen = 0; }