diff options
Diffstat (limited to 'celt')
-rw-r--r-- | celt/arch.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/celt/arch.h b/celt/arch.h index ffca8cf3..ad7bf283 100644 --- a/celt/arch.h +++ b/celt/arch.h @@ -79,9 +79,11 @@ void celt_fatal(const char *str, const char *file, int line) #define celt_assert(cond) {if (!(cond)) {CELT_FATAL("assertion failed: " #cond);}} #define celt_assert2(cond, message) {if (!(cond)) {CELT_FATAL("assertion failed: " #cond "\n" message);}} +#define MUST_SUCCEED(call) celt_assert((call) == OPUS_OK) #else #define celt_assert(cond) #define celt_assert2(cond, message) +#define MUST_SUCCEED(call) do {if((call) != OPUS_OK) {RESTORE_STACK; return OPUS_INTERNAL_ERROR;} } while (0) #endif #if defined(ENABLE_ASSERTIONS) |