diff options
author | David Sterba <dsterba@suse.com> | 2017-01-24 13:17:25 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-01-25 09:48:17 +0100 |
commit | eb6e3d6518c314d32e5263f823284ad05e1c46de (patch) | |
tree | a2dd63e6bfb72b6957032f78f50814c974140aec /kerncompat.h | |
parent | be5e0b230cc0a14823e3b7e005bdda40d19d20f2 (diff) |
btrfs-progs: kerncompat: pass exact condition value from ASSERT
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'kerncompat.h')
-rw-r--r-- | kerncompat.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kerncompat.h b/kerncompat.h index 94d815f2..3362d251 100644 --- a/kerncompat.h +++ b/kerncompat.h @@ -299,13 +299,13 @@ static inline int IS_ERR_OR_NULL(const void *ptr) static inline void assert_trace(const char *assertion, const char *filename, const char *func, unsigned line, long val) { - if (!val) + if (val) return; warning_trace(assertion, filename, func, line, val); abort(); exit(1); } -#define ASSERT(c) assert_trace(#c, __FILE__, __func__, __LINE__, (long)!(c)) +#define ASSERT(c) assert_trace(#c, __FILE__, __func__, __LINE__, (long)(c)) #else #define ASSERT(c) assert(c) #endif |