* src/system.h (emit_cycle_warning): Define. Factored out of...
* src/remove.c (rm_fts): ...here. Use the new macro.
}
case FTS_DC: /* directory that causes cycles */
- error (0, 0, _("\
-WARNING: Circular directory structure.\n\
-This almost certainly means that you have a corrupted file system.\n\
-NOTIFY YOUR SYSTEM MANAGER.\n\
-The following directory is part of the cycle:\n %s\n"),
- quote (ent->fts_path));
+ emit_cycle_warning (ent->fts_path);
fts_skip_tree (fts, ent);
return RM_ERROR;
void usage (int status) ATTRIBUTE_NORETURN;
+#define emit_cycle_warning(file_name) \
+ do \
+ { \
+ error (0, 0, _("\
+WARNING: Circular directory structure.\n\
+This almost certainly means that you have a corrupted file system.\n\
+NOTIFY YOUR SYSTEM MANAGER.\n\
+The following directory is part of the cycle:\n %s\n"), \
+ quote (file_name)); \
+ } \
+ while (0)
+
#ifndef ARRAY_CARDINALITY
# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
#endif