fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/27047 )
Change subject: core/utils.h: make use of OSMO_LIKELY in OSMO_ASSERT ......................................................................
core/utils.h: make use of OSMO_LIKELY in OSMO_ASSERT
Change-Id: I29b32a2477ec92762f8f0ce5e5c5a30810f6abbe --- M include/osmocom/core/utils.h 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/47/27047/1
diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 30d8be6..e6225a0 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -111,7 +111,8 @@ * the predicate evaluates to false (0). */ #define OSMO_ASSERT(exp) \ - if (!(exp)) { \ + if (OSMO_LIKELY(exp)) ; \ + else { \ osmo_panic("Assert failed %s %s:%d\n", #exp, __FILE__, __LINE__); \ }