|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH xenvbd] xencrsh: use ASSERT() in ASSERT3U/3S/3P() rather than BUG_ON()
From: Paul Durrant <pdurrant@xxxxxxxxxx>
ASSERT() then resolves to BUG_ON() followed by __analysis_assume(), which
avoids some spurious warnings during code analysis.
Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx>
---
src/xencrsh/assert.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/xencrsh/assert.h b/src/xencrsh/assert.h
index 546be5b..c746c89 100644
--- a/src/xencrsh/assert.h
+++ b/src/xencrsh/assert.h
@@ -87,7 +87,7 @@ __BugCheck(
if (!(_Lval _OP _Rval)) { \
LogError("%s = %llu\n", #_X, _Lval);\
LogError("%s = %llu\n", #_Y, _Rval);\
- BUG_ON(_X _OP _Y); \
+ ASSERT((_X) _OP (_Y)); \
} \
} while (FALSE)
@@ -98,7 +98,7 @@ __BugCheck(
if (!(_Lval _OP _Rval)) { \
LogError("%s = %lld\n", #_X, _Lval);\
LogError("%s = %lld\n", #_Y, _Rval);\
- BUG_ON(_X _OP _Y); \
+ ASSERT((_X) _OP (_Y)); \
} \
} while (FALSE)
@@ -109,7 +109,7 @@ __BugCheck(
if (!(_Lval _OP _Rval)) { \
LogError("%s = %p\n", #_X, _Lval); \
LogError("%s = %p\n", #_Y, _Rval); \
- BUG_ON(_X _OP _Y); \
+ ASSERT((_X) _OP (_Y)); \
} \
} while (FALSE)
--
2.17.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |