(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>
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)
{
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)