This commit is contained in:
Nikita Ivanov 2022-08-02 21:04:14 +05:00
parent 462f75761a
commit d09539f627
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133

View File

@ -17,7 +17,7 @@
#define ERRCHK_PRINT_(...) \ #define ERRCHK_PRINT_(...) \
do { \ do { \
__VA_OPT__(PRINTINTERR(__VA_ARGS__);) \ PRINTINTERR(__VA_ARGS__); \
} while (0) } while (0)
/* /*
@ -27,7 +27,7 @@
#define ERRCHK_RET(cond, ...) \ #define ERRCHK_RET(cond, ...) \
do { \ do { \
if (cond) { \ if (cond) { \
ERRCHK_PRINT_(__VA_ARGS__); \ __VA_OPT__(ERRCHK_PRINT_(__VA_ARGS__);) \
return ERR; \ return ERR; \
} \ } \
} while (0) } while (0)
@ -35,7 +35,7 @@
#define ERRCHK_GOTO(cond, ret, label, ...) \ #define ERRCHK_GOTO(cond, ret, label, ...) \
do { \ do { \
if (cond) { \ if (cond) { \
ERRCHK_PRINT_(__VA_ARGS__); \ __VA_OPT__(ERRCHK_PRINT_(__VA_ARGS__);) \
ret = ERR; \ ret = ERR; \
goto label; \ goto label; \
} \ } \