summaryrefslogtreecommitdiff
path: root/src/rm.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/rm.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/rm.c')
-rw-r--r--src/rm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rm.c b/src/rm.c
index 0dff18a4c..51b80facf 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -105,9 +105,8 @@ diagnose_leading_hyphen (int argc, char **argv)
{
/* OPTIND is unreliable, so iterate through the arguments looking
for a file name that looks like an option. */
- int i;
- for (i = 1; i < argc; i++)
+ for (int i = 1; i < argc; i++)
{
char const *arg = argv[i];
struct stat st;