projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ace5387
)
Clean up ls.c.
author
Jim Meyering
<meyering@redhat.com>
Tue, 12 Feb 2008 17:13:09 +0000
(18:13 +0100)
committer
Jim Meyering
<meyering@redhat.com>
Sun, 17 Feb 2008 10:16:18 +0000
(11:16 +0100)
* src/ls.c (put_indicator): Use fwrite, not a loop.
src/ls.c
patch
|
blob
|
history
diff --git
a/src/ls.c
b/src/ls.c
index
0eb2b27
..
e029fe0
100644
(file)
--- 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