summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2019-10-16 03:02:49 -0700
committerCommit Bot <commit-bot@chromium.org>2019-10-23 20:31:30 +0000
commit3ca7a99d01b5b7e3b9593ed3d097f7ab1330e637 (patch)
tree1a829598b139acdecf59dcd017be2303d6592afc /builtin
parent1a775899f44dbb682b2dce94d27493d9dda82588 (diff)
downloadchrome-ec-3ca7a99d01b5b7e3b9593ed3d097f7ab1330e637.tar.gz
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/assert.h26
1 files 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