summaryrefslogtreecommitdiffstats
path: root/text-utils/ul.c
diff options
context:
space:
mode:
authorSami Kerola2013-07-07 21:54:47 +0200
committerKarel Zak2013-07-09 14:25:55 +0200
commit67519cdd8f69da9a81cd7a30a8f32104215a280a (patch)
tree53cb7a3defd1ecfff9ac4df0c431c411b274d637 /text-utils/ul.c
parentul: use correct types (diff)
downloadkernel-qcow2-util-linux-67519cdd8f69da9a81cd7a30a8f32104215a280a.tar.gz
kernel-qcow2-util-linux-67519cdd8f69da9a81cd7a30a8f32104215a280a.tar.xz
kernel-qcow2-util-linux-67519cdd8f69da9a81cd7a30a8f32104215a280a.zip
ul: use string printing function
Use of for loop and printing a string character by character is slower than to print whole string with single function. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'text-utils/ul.c')
-rw-r--r--text-utils/ul.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/text-utils/ul.c b/text-utils/ul.c
index 26d2b172d..b3b3dc354 100644
--- a/text-utils/ul.c
+++ b/text-utils/ul.c
@@ -447,8 +447,7 @@ static void overstrike(void)
putwchar('\r');
for (*cp = ' '; *cp == ' '; cp--)
*cp = 0;
- for (cp = lbuf; *cp; cp++)
- putwchar(*cp);
+ fputws(lbuf, stdout);
if (hadbold) {
putwchar('\r');
for (cp = lbuf; *cp; cp++)
@@ -481,8 +480,7 @@ static void iattr(void)
}
for (*cp = ' '; *cp == ' '; cp--)
*cp = 0;
- for (cp = lbuf; *cp; cp++)
- putwchar(*cp);
+ fputws(lbuf, stdout);
putwchar('\n');
}