From f0bafdb427952a22c057c985d5c9988475c4bda6 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 12 Feb 2008 18:13:09 +0100 Subject: [PATCH] Clean up ls.c. * src/ls.c (put_indicator): Use fwrite, not a loop. --- src/ls.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/ls.c b/src/ls.c index 0eb2b27..e029fe0 100644 --- a/src/ls.c +++ b/src/ls.c @@ -3997,19 +3997,13 @@ print_color_indicator (const char *name, mode_t mode, int linkok, static void put_indicator (const struct bin_str *ind) { - size_t i; - const char *p; - if (! used_color) { used_color = true; prep_non_filename_text (); } - p = ind->string; - - for (i = ind->len; i != 0; --i) - putchar (*(p++)); + fwrite (ind->string, ind->len, 1, stdout); } static size_t -- 2.7.4