X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fhardlink.c;h=461c9523371309b3594833d82e241a4234dd6bfd;hp=23ae370fc029cb516e04c66f2a56025dd66a011f;hb=fced769402ff6ef0bf75fe9e4dcb2880891469e0;hpb=1cf955f8e732e1745a90457e652505f24b7f8cf5 diff --git a/src/hardlink.c b/src/hardlink.c index 23ae370f..461c9523 100644 --- a/src/hardlink.c +++ b/src/hardlink.c @@ -209,25 +209,23 @@ inode_table_new_dentry(struct wim_inode_table *table, const tchar *name, return 0; } -#if defined(ENABLE_ERROR_MESSAGES) || defined(ENABLE_DEBUG) -static void +static inline void print_inode_dentries(const struct wim_inode *inode) { struct wim_dentry *dentry; inode_for_each_dentry(dentry, inode) tfprintf(stderr, T("%"TS"\n"), dentry_full_path(dentry)); } -#endif static void inconsistent_inode(const struct wim_inode *inode) { -#ifdef ENABLE_ERROR_MESSAGES - ERROR("An inconsistent hard link group that cannot be corrected has " - "been detected"); - ERROR("The dentries are located at the following paths:"); - print_inode_dentries(inode); -#endif + if (wimlib_print_errors) { + ERROR("An inconsistent hard link group that cannot be corrected has " + "been detected"); + ERROR("The dentries are located at the following paths:"); + print_inode_dentries(inode); + } } static bool