1 # Unnecessary patch - reduces the code size slightly, gives clearer
2 # messages if IX_OSAL_ENSURE_ON is set
3 # include/IxOsalAssert.h | 4 ++--
4 # os/linux/include/core/IxOsalOsAssert.h | 9 ++++++++-
5 # 2 files changed, 10 insertions(+), 3 deletions(-)
7 --- ixp_osal/include/IxOsalAssert.h 1970-01-01 00:00:00.000000000 +0000
8 +++ ixp_osal/include/IxOsalAssert.h 1970-01-01 00:00:00.000000000 +0000
11 #ifdef IX_OSAL_ENSURE_ON
12 #define IX_OSAL_ENSURE(c, str) do { \
13 -if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, str, \
14 -0, 0, 0, 0, 0, 0); } while (0)
15 +if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, __FILE__ ": line %d: " str, \
16 +__LINE__, 0, 0, 0, 0, 0); } while (0)
19 #define IX_OSAL_ENSURE(c, str)
20 --- ixp_osal/os/linux/include/core/IxOsalOsAssert.h 1970-01-01 00:00:00.000000000 +0000
21 +++ ixp_osal/os/linux/include/core/IxOsalOsAssert.h 1970-01-01 00:00:00.000000000 +0000
24 #ifndef IxOsalOsAssert_H
25 #define IxOsalOsAssert_H
26 +#ifdef IX_OSAL_ENSURE_ON
27 #define IX_OSAL_OS_ASSERT(c) if(!(c)) \
29 - ixOsalLog (IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, "Assertion failure \n", 0, 0, 0, 0, 0, 0);\
30 + ixOsalLog (IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, "%s line %d: Assertion failure: %s\n", (int)__FILE__, __LINE__, (int)#c, 0, 0, 0);\
34 +#define IX_OSAL_OS_ASSERT(c) if(!(c)) \