diff options
author | Sami Kerola | 2013-07-07 21:54:49 +0200 |
---|---|---|
committer | Karel Zak | 2013-07-09 14:26:10 +0200 |
commit | b9f3d0c0ff7b464d07dea530332cd0546b2c55a4 (patch) | |
tree | f22ab846642c7d7783463e68677870d93bcbfa24 /text-utils | |
parent | column: dereference of null pointer [clang-analyzer] (diff) | |
download | kernel-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')
-rw-r--r-- | text-utils/more.c | 3 |
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; } |