Skip to content

Commit e7c25d2

Browse files
amotinlundman
authored andcommitted
Add missing parenthesis in VERIFYF()
Without them the order of operations might get unexpected. Reviewed-by: Adam Moss <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Reviewed-by: Rob Norris <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc. Closes openzfs#16826
1 parent 3f29f14 commit e7c25d2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/os/freebsd/spl/sys/debug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line)
105105
__FILE__, __FUNCTION__, __LINE__))
106106

107107
#define VERIFYF(cond, str, ...) do { \
108-
if (unlikely(!cond)) \
108+
if (unlikely(!(cond))) \
109109
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
110110
"VERIFY(" #cond ") failed " str "\n", __VA_ARGS__);\
111111
} while (0)

include/os/linux/spl/sys/debug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line)
109109
__FILE__, __FUNCTION__, __LINE__))
110110

111111
#define VERIFYF(cond, str, ...) do { \
112-
if (unlikely(!cond)) \
112+
if (unlikely(!(cond))) \
113113
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
114114
"VERIFY(" #cond ") failed " str "\n", __VA_ARGS__);\
115115
} while (0)

0 commit comments

Comments
 (0)