summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2000-06-05 19:56:52 +0000
committerache <ache@FreeBSD.org>2000-06-05 19:56:52 +0000
commitf2b2cff75dc56f03de055849f2e1538ccb566024 (patch)
tree173abbcadddf98846726e6525fd966973c47e5d4 /bin
parent5bc31495b7543e4ab497f261fecc6fe3e8252d2f (diff)
downloadFreeBSD-src-f2b2cff75dc56f03de055849f2e1538ccb566024.zip
FreeBSD-src-f2b2cff75dc56f03de055849f2e1538ccb566024.tar.gz
Cosmetique of prev. optimization - don't use global variable
Diffstat (limited to 'bin')
-rw-r--r--bin/ls/print.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c
index 4c3f568..8d47501 100644
--- a/bin/ls/print.c
+++ b/bin/ls/print.c
@@ -92,7 +92,6 @@ typedef enum Colors {
char *defcolors = "4x5x2x3x1x464301060203";
static int colors[C_NUMCOLORS][2];
-static int color_printed = 0;
#endif
void
@@ -117,6 +116,9 @@ printlong(dp)
FTSENT *p;
NAMES *np;
char buf[20];
+#ifdef COLORLS
+ int color_printed = 0;
+#endif
if (dp->list->fts_level != FTS_ROOTLEVEL && (f_longform || f_size))
(void)printf("total %lu\n", howmany(dp->btotal, blocksize));
@@ -269,6 +271,9 @@ printaname(p, inodefield, sizefield)
{
struct stat *sp;
int chcnt;
+#ifdef COLORLS
+ int color_printed = 0;
+#endif
sp = p->fts_statp;
chcnt = 0;
OpenPOWER on IntegriCloud