Commit b862963a authored by Guido Casati's avatar Guido Casati

Add macro to check result of dec lib functions and return with a failure

parent 212fe8d2
...@@ -34,6 +34,14 @@ ...@@ -34,6 +34,14 @@
#define PRINT_ERROR(...) // Do nothing #define PRINT_ERROR(...) // Do nothing
#endif #endif
#define CHECK_E1AP_DEC(exp) \
do { \
if (!(exp)) { \
PRINT_ERROR("Failed executing " #exp " in %s() line %d\n", __func__, __LINE__); \
return false; \
} \
} while (0)
#define _E1_EQ_CHECK_GENERIC(condition, fmt, ...) \ #define _E1_EQ_CHECK_GENERIC(condition, fmt, ...) \
do { \ do { \
if (!(condition)) { \ if (!(condition)) { \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment