[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] blktap2: use abort() instead of custom crash



commit 4d98d3ebfc88e637f9f00c787cf07e9e6c6bd3b5
Author:     Doug Goldstein <cardoe@xxxxxxxxxx>
AuthorDate: Tue Apr 26 08:04:46 2016 -0500
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Tue Apr 26 15:23:16 2016 +0100

    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@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/blktap2/drivers/tapdisk-vbd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/blktap2/drivers/tapdisk-vbd.c 
b/tools/blktap2/drivers/tapdisk-vbd.c
index 31bc2fe..e2e9cd5 100644
--- a/tools/blktap2/drivers/tapdisk-vbd.c
+++ b/tools/blktap2/drivers/tapdisk-vbd.c
@@ -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
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.