mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
* src/rm.c (main): Remove unnecessary (assuming C99) braces.
This commit is contained in:
1 parent
08dcc35470
commit
8ec7811e82
2 files changed
+19
-17
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
Reference in new issue
Block a user