Go to the documentation of this file.
90 #define CHECK(CONDITION, MESSAGE, ...) do { \
92 VS_LOG_ERROR((MESSAGE), ##__VA_ARGS__); \
108 #define CHECK_RET(CONDITION, RETCODE, MESSAGE, ...) do { \
109 if (!(CONDITION)) { \
110 VS_LOG_ERROR((MESSAGE), ##__VA_ARGS__); \
125 #define BOOL_CHECK(CONDITION, MESSAGE, ...) CHECK((CONDITION), (MESSAGE), ##__VA_ARGS__)
137 #define BOOL_CHECK_RET(CONDITION, MESSAGE, ...) CHECK_RET((CONDITION), false, (MESSAGE), ##__VA_ARGS__)
151 #define MEMCMP_CHECK(BUF1, BUF2, SIZE) \
152 CHECK(VS_IOT_MEMCMP((BUF1), (BUF2), (SIZE)) == 0, \
153 #BUF1 " is not equal to " #BUF2 " while comparing %d bytes", \
171 #define MEMCMP_CHECK_RET(BUF1, BUF2, SIZE, RETCODE) \
172 CHECK_RET(VS_IOT_MEMCMP((BUF1), (BUF2), (SIZE)) == 0, (RETCODE), \
173 #BUF1 " is not equal to " #BUF2 " while comparing %d bytes", \
185 #define CHECK_NOT_ZERO(ARG) CHECK((ARG), "Argument " #ARG " must not be zero")
199 #define CHECK_NOT_ZERO_RET(ARG, RETCODE) CHECK_RET((ARG), (RETCODE), "Argument " #ARG " must not be zero") \
201 #endif // VS_MACROS_H