summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-11-26 18:35:38 +0100
committerJim Meyering <jim@meyering.net>2006-11-26 18:35:38 +0100
commit8ec7811e82d7e706d886bb209d1520eeb6cc2525 (patch)
treea5c46c98a24e148aa6b0d6193036b5d851a6b239
parent08dcc35470d3f7bb943b44b7701a9955fcab14ff (diff)
downloadcoreutils-8ec7811e82d7e706d886bb209d1520eeb6cc2525.tar.xz
* src/rm.c (main): Remove unnecessary (assuming C99) braces.
-rw-r--r--ChangeLog4
-rw-r--r--src/rm.c34
2 files changed, 20 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 4427eb944..a1e873d49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-11-26 Jim Meyering <jim@meyering.net>
+
+ * src/rm.c (main): Remove unnecessary (assuming C99) braces.
+
2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
diff --git a/src/rm.c b/src/rm.c
index 0c93a040a..364a21cf5 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -355,22 +355,20 @@ main (int argc, char **argv)
quote ("/"));
}
- {
- size_t n_files = argc - optind;
- char const *const *file = (char const *const *) argv + optind;
-
- if (prompt_once && (x.recursive || 3 < n_files))
- {
- fprintf (stderr,
- (x.recursive
- ? _("%s: remove all arguments recursively? ")
- : _("%s: remove all arguments? ")),
- program_name);
- if (!yesno ())
- exit (EXIT_SUCCESS);
- }
- enum RM_status status = rm (n_files, file, &x);
- assert (VALID_STATUS (status));
- exit (status == RM_ERROR ? EXIT_FAILURE : EXIT_SUCCESS);
- }
+ size_t n_files = argc - optind;
+ char const *const *file = (char const *const *) argv + optind;
+
+ if (prompt_once && (x.recursive || 3 < n_files))
+ {
+ fprintf (stderr,
+ (x.recursive
+ ? _("%s: remove all arguments recursively? ")
+ : _("%s: remove all arguments? ")),
+ program_name);
+ if (!yesno ())
+ exit (EXIT_SUCCESS);
+ }
+ enum RM_status status = rm (n_files, file, &x);
+ assert (VALID_STATUS (status));
+ exit (status == RM_ERROR ? EXIT_FAILURE : EXIT_SUCCESS);
}