From b9f3d0c0ff7b464d07dea530332cd0546b2c55a4 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 7 Jul 2013 20:54:49 +0100 Subject: more: use variable lenght printf field width to print blanks This makes program to run a little faster. Signed-off-by: Sami Kerola --- text-utils/more.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'text-utils/more.c') diff --git a/text-utils/more.c b/text-utils/more.c index 8888a083b..3bbeede5d 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; } -- cgit v1.2.3-55-g7522