diff options
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/core/utils.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 03861d78..8f7bee31 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -51,6 +51,13 @@ do { \ rem -= ret; \ } while (0) +#define OSMO_ASSERT(exp) \ + if (!(exp)) { \ + printf("Assert failed %s %s:%d\n", #exp, __FILE__, __LINE__); \ + abort(); \ + } + + /*! @} */ #endif |