summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-09-23 20:44:02 +0200
committerDavid Sterba <dsterba@suse.com>2017-09-25 15:18:17 +0200
commit8eccfa86c0c7f1645556a119d8b217d7173af10d (patch)
tree64a4c04bca84b5c377df486951fa9cffea4bc47a
parent5b2fbc6f4e93286273f9e7a67834a02004f3f875 (diff)
btrfs-progs: fix debugging macro checks
Sparse warns that the DEBUG_*_ERROR macros are not defined when checked. Use the ifdef check rather then relying on the implicit behaviour. Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--messages.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/messages.h b/messages.h
index a308b4b1..4999c7b9 100644
--- a/messages.h
+++ b/messages.h
@@ -17,19 +17,19 @@
#ifndef __BTRFS_MESSAGES_H__
#define __BTRFS_MESSAGES_H__
-#if DEBUG_VERBOSE_ERROR
+#ifdef DEBUG_VERBOSE_ERROR
#define PRINT_VERBOSE_ERROR fprintf(stderr, "%s:%d:", __FILE__, __LINE__)
#else
#define PRINT_VERBOSE_ERROR
#endif
-#if DEBUG_TRACE_ON_ERROR
+#ifdef DEBUG_TRACE_ON_ERROR
#define PRINT_TRACE_ON_ERROR print_trace()
#else
#define PRINT_TRACE_ON_ERROR
#endif
-#if DEBUG_ABORT_ON_ERROR
+#ifdef DEBUG_ABORT_ON_ERROR
#define DO_ABORT_ON_ERROR abort()
#else
#define DO_ABORT_ON_ERROR