From: Sami Kerola Date: Sun, 7 Jul 2013 19:54:47 +0000 (+0100) Subject: ul: use string printing function X-Git-Tag: v2.24-rc1~431 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67519cdd8f69da9a81cd7a30a8f32104215a280a;p=thirdparty%2Futil-linux.git 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 --- diff --git a/text-utils/ul.c b/text-utils/ul.c index 26d2b172d2..b3b3dc354c 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'); }