blktap2: use abort() instead of custom crash

Instead of trying to write a snippet of code that crashes the process
just use abort() directly. This is to fix the build on clang which
detects that the snippet of code will crash and fails to compile. At
the same time removed extraneous whitespace in the macro.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
Doug Goldstein authored and Wei Liu committed 2016-04-26 15:23:16 +01:00
1 parent f7cd9d2c6b
commit 4d98d3ebfc
1 file changed
+3 -3
+3 -3
View File
@@ -49,18 +49,18 @@
#define DBG(_level, _f, _a...) tlog_write(_level, _f, ##_a)
#define ERR(_err, _f, _a...) tlog_error(_err, _f, ##_a)
#if 1
#if 1
#define ASSERT(p) \
do { \
if (!(p)) { \
DPRINTF("Assertion '%s' failed, line %d, " \
"file %s", #p, __LINE__, __FILE__); \
*(int*)0 = 0; \
abort(); \
} \
} while (0)
#else
#define ASSERT(p) ((void)0)
#endif
#endif
#define TD_VBD_EIO_RETRIES 10
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.