]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
blktap2: use abort() instead of custom crash
authorDoug Goldstein <cardoe@cardoe.com>
Tue, 26 Apr 2016 13:04:46 +0000 (08:04 -0500)
committerWei Liu <wei.liu2@citrix.com>
Tue, 26 Apr 2016 14:23:16 +0000 (15:23 +0100)
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>
tools/blktap2/drivers/tapdisk-vbd.c

index 31bc2fe3d128628d9da7ed1b5c865b8d04919a24..e2e9cd5bc9e0dc9a41444b0af9b5ce4b284294ce 100644 (file)
 #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