Commit cd89db5c authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Add a convenience macro invoke subroutines

To properly fail a test in a subroutine, return value needs to be passed up.
This snippet makes it short.

PUBLISHED_FROM=2f6328b5eb2921a4caa53d8887c02f73a5d817ea
parent 1ed99999
......@@ -165,6 +165,12 @@ void _strfail(const char *a, const char *e, int len);
} \
} while (0)
#define CHECK_CALL(call) \
do { \
const char *r = (call); \
if (r != NULL) return r; \
} while (0)
#ifndef MG_ENABLE_POLL_UNTIL
#define MG_ENABLE_POLL_UNTIL 0
#endif
......
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