summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2018-10-16 18:05:10 +0200
committerDaiki Ueno <ueno@gnu.org>2018-10-17 10:13:32 +0200
commit8a8db182af533a43b4d478d28af8623035475d68 (patch)
tree31ff9a33f1ac7ce0e410e50763d1e9d968e45cc5
parentf4a9fa674e17cc470d9280237032f18a70313d8e (diff)
debug: Work around cppcheck false-positives
https://trac.cppcheck.net/ticket/8794
-rw-r--r--common/debug.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/debug.h b/common/debug.h
index 255c62c..7ea36f3 100644
--- a/common/debug.h
+++ b/common/debug.h
@@ -71,13 +71,13 @@ void p11_debug_precond (const char *format,
#endif
#define return_val_if_fail(x, v) \
- do { if (!(x)) { \
+ do { if (x) { } else { \
p11_debug_precond ("p11-kit: '%s' not true at %s\n", #x, __func__); \
return v; \
} } while (false)
#define return_if_fail(x) \
- do { if (!(x)) { \
+ do { if (x) { } else { \
p11_debug_precond ("p11-kit: '%s' not true at %s\n", #x, __func__); \
return; \
} } while (false)
@@ -100,7 +100,7 @@ void p11_debug_precond (const char *format,
} while (false)
#define warn_if_fail(x) \
- do { if (!(x)) { \
+ do { if (x) { } else { \
p11_debug_precond ("p11-kit: '%s' not true at %s\n", #x, __func__); \
} } while (false)