summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-02-12 18:13:09 +0100
committerJim Meyering <meyering@redhat.com>2008-02-17 11:16:18 +0100
commitf0bafdb427952a22c057c985d5c9988475c4bda6 (patch)
tree4210329cabf6d3f64d4b71083de19ba35f565d45
parentace5387fb6409b6ad773a43f3d1ef6dd922295c6 (diff)
downloadcoreutils-f0bafdb427952a22c057c985d5c9988475c4bda6.tar.xz
Clean up ls.c.
* src/ls.c (put_indicator): Use fwrite, not a loop.
-rw-r--r--src/ls.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/ls.c b/src/ls.c
index 0eb2b27a4..e029fe065 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