assert.h: clang-format
this is just a minor cosmetic fix of assert.h courtesy of clang-format. BRANCH=none BUG=none TEST=make buildall passes Change-Id: Ic503c22f1d29e0511a3b5ecbf697c5940c93d18c Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1864424 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
This commit is contained in:
parent
1a775899f4
commit
3ca7a99d01
|
@ -21,24 +21,28 @@ extern "C" {
|
|||
#ifdef CONFIG_DEBUG_ASSERT_BRIEF
|
||||
extern void panic_assert_fail(const char *fname, int linenum)
|
||||
__attribute__((noreturn));
|
||||
#define ASSERT(cond) do { \
|
||||
if (!(cond)) \
|
||||
panic_assert_fail(__FILE__, __LINE__); \
|
||||
#define ASSERT(cond) \
|
||||
do { \
|
||||
if (!(cond)) \
|
||||
panic_assert_fail(__FILE__, __LINE__); \
|
||||
} while (0)
|
||||
#else
|
||||
extern void panic_assert_fail(const char *msg, const char *func,
|
||||
const char *fname, int linenum) __attribute__((noreturn));
|
||||
#define ASSERT(cond) do { \
|
||||
if (!(cond)) \
|
||||
const char *fname, int linenum)
|
||||
__attribute__((noreturn));
|
||||
#define ASSERT(cond) \
|
||||
do { \
|
||||
if (!(cond)) \
|
||||
panic_assert_fail(#cond, __func__, __FILE__, \
|
||||
__LINE__); \
|
||||
__LINE__); \
|
||||
} while (0)
|
||||
#endif
|
||||
#else
|
||||
#define ASSERT(cond) do { \
|
||||
if (!(cond)) \
|
||||
__asm("bkpt"); \
|
||||
__builtin_unreachable();\
|
||||
#define ASSERT(cond) \
|
||||
do { \
|
||||
if (!(cond)) \
|
||||
__asm("bkpt"); \
|
||||
__builtin_unreachable(); \
|
||||
} while (0)
|
||||
#endif
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue