Change in libosmocore[master]: core/utils.h: make use of OSMO_LIKELY in OSMO_ASSERT
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__); \ } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27047 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I29b32a2477ec92762f8f0ce5e5c5a30810f6abbe Gerrit-Change-Number: 27047 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
fixeria