Simplify the FAIL macro
This commit is contained in:
parent
ad1aba9d22
commit
bb7ffe1da2
|
@ -67,11 +67,7 @@ enum
|
||||||
#include <term.h>
|
#include <term.h>
|
||||||
|
|
||||||
/// Shorthand to set an error and return failure from the function
|
/// Shorthand to set an error and return failure from the function
|
||||||
#define FAIL(...) \
|
#define FAIL(...) return error_set (e, __VA_ARGS__)
|
||||||
BLOCK_START \
|
|
||||||
error_set (e, __VA_ARGS__); \
|
|
||||||
return false; \
|
|
||||||
BLOCK_END
|
|
||||||
|
|
||||||
// --- Terminal ----------------------------------------------------------------
|
// --- Terminal ----------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue