From e181d64357aec3a1d22e1b0d8cf12aa4a809e996 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 31 Dec 2018 17:14:00 +0100 Subject: [PATCH] [priv] add AUBIO_GOTO_FAILURE helper --- src/aubio_priv.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/aubio_priv.h b/src/aubio_priv.h index 8cb6756c..99dd299a 100644 --- a/src/aubio_priv.h +++ b/src/aubio_priv.h @@ -409,4 +409,7 @@ uint_t aubio_log(sint_t level, const char_t *fmt, ...); #define AUBIO_ASSERT(x) #endif /* DEBUG */ +// goto to failure if condition x is not true +#define AUBIO_GOTO_FAILURE(x) if (!(x)) goto failure + #endif /* AUBIO_PRIV_H */ -- 2.11.0