commit 9d5aec88857ad39dedc0e70e10b1d4c37eab49c6 parent dd1324749b359bbf1dcabe2b7648866ecda6134a Author: Christophe Coustet <christophe.coustet@meso-star.com> Date: Tue, 27 Feb 2018 13:47:19 +0100 New utility macro. Diffstat:
| M | src/senc_internal_types.h | | | 9 | +++++---- |
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/senc_internal_types.h b/src/senc_internal_types.h @@ -20,11 +20,12 @@ #include <stdint.h> -/* Utility macro */ -#define OK(expr)\ - res = expr;\ - if(res != RES_OK) goto error; +/* Utility macros */ +#define OK2(Expr, Label)\ + res = (Expr);\ + if(res != RES_OK) goto Label; +#define OK(Expr) OK2((Expr), error) /* Side IDs are uint32_t */ typedef uint32_t side_id_t;