summaryrefslogtreecommitdiff
path: root/src/du.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2017-06-17 14:54:23 -0700
committerPádraig Brady <P@draigBrady.com>2017-06-17 15:51:59 -0700
commit1379bdc65b76471a344b2affc8f1e9b6188d1092 (patch)
treeddae4e04a297f46d5205365bd21f96fb23baf8b1 /src/du.c
parent18f6b22fe1eb4447b26fafd3bed1e6bb23c9adc2 (diff)
downloadcoreutils-1379bdc65b76471a344b2affc8f1e9b6188d1092.tar.gz
maint: use C99 for loop initial declarations where possible
This results in a net reduction of about 120 lines.
Diffstat (limited to 'src/du.c')
-rw-r--r--src/du.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/du.c b/src/du.c
index 8e88b5621..95797ff08 100644
--- a/src/du.c
+++ b/src/du.c
@@ -613,7 +613,6 @@ process_file (FTS *fts, FTSENT *ent)
Clear the accumulators for *all* levels between prev_level
and the current one. The depth may change dramatically,
e.g., from 1 to 10. */
- size_t i;
if (n_alloc <= level)
{
@@ -621,7 +620,7 @@ process_file (FTS *fts, FTSENT *ent)
n_alloc = level * 2;
}
- for (i = prev_level + 1; i <= level; i++)
+ for (size_t i = prev_level + 1; i <= level; i++)
{
duinfo_init (&dulvl[i].ent);
duinfo_init (&dulvl[i].subdir);