[priv] add AUBIO_GOTO_FAILURE helper
authorPaul Brossier <piem@piem.org>
Mon, 31 Dec 2018 16:14:00 +0000 (17:14 +0100)
committerPaul Brossier <piem@piem.org>
Mon, 31 Dec 2018 16:14:00 +0000 (17:14 +0100)
src/aubio_priv.h

index ab6afb2..28bbaa9 100644 (file)
@@ -396,4 +396,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 */