summaryrefslogtreecommitdiffstats
path: root/text-utils/more.c
diff options
context:
space:
mode:
authorSami Kerola2013-07-07 21:54:49 +0200
committerKarel Zak2013-07-09 14:26:10 +0200
commitb9f3d0c0ff7b464d07dea530332cd0546b2c55a4 (patch)
treef22ab846642c7d7783463e68677870d93bcbfa24 /text-utils/more.c
parentcolumn: dereference of null pointer [clang-analyzer] (diff)
downloadkernel-qcow2-util-linux-b9f3d0c0ff7b464d07dea530332cd0546b2c55a4.tar.gz
kernel-qcow2-util-linux-b9f3d0c0ff7b464d07dea530332cd0546b2c55a4.tar.xz
kernel-qcow2-util-linux-b9f3d0c0ff7b464d07dea530332cd0546b2c55a4.zip
more: use variable lenght printf field width to print blanks
This makes program to run a little faster. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'text-utils/more.c')
-rw-r--r--text-utils/more.c3
1 files changed, 1 insertions, 2 deletions
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;
}