summaryrefslogtreecommitdiff
path: root/ext2fs
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-14 02:36:33 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-15 11:03:24 +0200
commit714c72349f136c4b798d0df847f85340c6e76aa8 (patch)
tree28b7e4c4fd12cac1cb9b7ab0055b7b5a12f41bcc /ext2fs
parent72758b677ad240fd80b769e92f85c639860e6b97 (diff)
ext2fs: provide unconditional debug macro
* ext2fs/ext2fs.h (ext2_debug_): New macro that unconditionally prints the given message. (ext2_debug): Use the new macro.
Diffstat (limited to 'ext2fs')
-rw-r--r--ext2fs/ext2fs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h
index 0009af0f..72b7b09d 100644
--- a/ext2fs/ext2fs.h
+++ b/ext2fs/ext2fs.h
@@ -52,8 +52,10 @@ typedef int8_t __s8;
#ifdef EXT2FS_DEBUG
#include <stdio.h>
extern int ext2_debug_flag;
+#define ext2_debug_(f, a...) \
+ fprintf (stderr, "ext2fs: (debug) %s: " f "\n", __FUNCTION__ , ## a)
#define ext2_debug(f, a...) \
- do { if (ext2_debug_flag) fprintf (stderr, "ext2fs: (debug) %s: " f "\n", __FUNCTION__ , ## a); } while (0)
+ do { if (ext2_debug_flag) ext2_debug_(f, ## a); } while (0)
#else
#define ext2_debug(f, a...) (void)0
#endif