From d90c858715f77e2ddefd00a394ceb55fb9434f01 Mon Sep 17 00:00:00 2001 From: Pengfei Date: Mon, 30 Aug 2021 20:03:27 +0800 Subject: [PATCH] Update TRY macro to allow for use without second argument --- src/common/common_funcs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index 0ce340b..1c81280 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -19,9 +19,9 @@ #define CONCAT2(x, y) DO_CONCAT2(x, y) #define DO_CONCAT2(x, y) x##y -#define TRY(x, fail) \ +#define TRY(x, ...) \ if (!(x)) { \ - fail; \ + __VA_ARGS__; \ return false; \ }