mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
* src/remove.c (rm): Move cycle_check_init call into callee...
Use an else clause in place of a "continue" statement. Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
This commit is contained in:
1 parent
1ce71652fc
commit
a23c91026d
2 files changed
+10
-6
No files matched your search
@@ -9,6 +9,9 @@
|
||||
(AD_ensure_initialized): New function.
|
||||
(AD_mark_helper): Use it, to avoid the need for declaration
|
||||
after statement.
|
||||
(rm): Move cycle_check_init call into callee...
|
||||
(rm_1): ...here.
|
||||
Use an else clause in place of a "continue" statement.
|
||||
|
||||
2006-11-25 Jim Meyering <jim@meyering.net>
|
||||
|
||||
|
||||
+7
-6
@@ -1479,6 +1479,7 @@ rm_1 (Dirstack_state *ds, char const *filename,
|
||||
|
||||
struct stat st;
|
||||
cache_stat_init (&st);
|
||||
cycle_check_init (&ds->cycle_check_state);
|
||||
if (x->root_dev_ino)
|
||||
{
|
||||
if (cache_fstatat (AT_FDCWD, filename, &st, AT_SYMLINK_NOFOLLOW) != 0)
|
||||
@@ -1532,13 +1533,13 @@ rm (size_t n_files, char const *const *file, struct rm_options const *x)
|
||||
{
|
||||
error (0, 0, _("cannot remove relative-named %s"), quote (file[i]));
|
||||
status = RM_ERROR;
|
||||
continue;
|
||||
}
|
||||
|
||||
cycle_check_init (&ds->cycle_check_state);
|
||||
enum RM_status s = rm_1 (ds, file[i], x, &cwd_errno);
|
||||
assert (VALID_STATUS (s));
|
||||
UPDATE_STATUS (status, s);
|
||||
else
|
||||
{
|
||||
enum RM_status s = rm_1 (ds, file[i], x, &cwd_errno);
|
||||
assert (VALID_STATUS (s));
|
||||
UPDATE_STATUS (status, s);
|
||||
}
|
||||
}
|
||||
|
||||
if (x->require_restore_cwd && cwd_errno)
|
||||
|
||||
Reference in new issue
Block a user