diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-05-29 11:23:29 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-05-29 11:23:29 +0300 |
| commit | e148f38dc937c34b222ba8df8612b3fa2b6bc349 (patch) | |
| tree | c51f045c6632b2073cb0e3183bd9d3b559ccd228 /include/apos/assert.h | |
| parent | 360c18fcbe228220e5c9799fb30b2032982c06cf (diff) | |
| download | kmi-e148f38dc937c34b222ba8df8612b3fa2b6bc349.tar.gz kmi-e148f38dc937c34b222ba8df8612b3fa2b6bc349.zip | |
modify formatting rules
Diffstat (limited to 'include/apos/assert.h')
| -rw-r--r-- | include/apos/assert.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/include/apos/assert.h b/include/apos/assert.h index 97523c7..81b267b 100644 --- a/include/apos/assert.h +++ b/include/apos/assert.h @@ -26,13 +26,13 @@ * * @param x Condition to check for. */ -#define catastrophic_assert(x) \ - do { \ - if (unlikely(!(x))) { \ +#define catastrophic_assert(x) \ + do { \ + if (unlikely(!(x))) { \ error("catastrophic assertion failed: " QUOTE(x) "\n"); \ - while (1) { \ - } \ - } \ + while (1) { \ + } \ + } \ } while (0); /** @@ -44,12 +44,12 @@ * @param x Condition to check for. * @param r Return value on failed check. */ -#define hard_assert(x, r) \ - { \ - if (unlikely(!(x))) { \ - warn("hard assertion failed: " QUOTE(x) "\n"); \ - return r; \ - } \ +#define hard_assert(x, r) \ + { \ + if (unlikely(!(x))) { \ + warn("hard assertion failed: " QUOTE(x) "\n"); \ + return r; \ + } \ } /** @@ -57,11 +57,11 @@ * * @param x Condition to check for. */ -#define soft_assert(x) \ - do { \ - if (unlikely(!(x))) { \ - info("soft assertion failed: " QUOTE(x) "\n"); \ - } \ +#define soft_assert(x) \ + do { \ + if (unlikely(!(x))) { \ + info("soft assertion failed: " QUOTE(x) "\n"); \ + } \ } while (0); #else #define catastrophic_assert(x) |
