From 3ca7a99d01b5b7e3b9593ed3d097f7ab1330e637 Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Wed, 16 Oct 2019 03:02:49 -0700 Subject: [PATCH] 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1864424 Commit-Queue: Jack Rosenthal Reviewed-by: Jack Rosenthal --- builtin/assert.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/builtin/assert.h b/builtin/assert.h index a2a5dd0228..4682fecbd7 100644 --- a/builtin/assert.h +++ b/builtin/assert.h @@ -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