From 7162caee205252f60ca150abc5f67c711094f308 Mon Sep 17 00:00:00 2001 From: Terje Runde Date: Mon, 22 Sep 2025 12:55:18 +0200 Subject: [PATCH] Fix erroneous documentation of TU_ASSERT/TU_VERIFY --- src/common/tusb_verify.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/tusb_verify.h b/src/common/tusb_verify.h index 6d02d3572..db91a73d9 100644 --- a/src/common/tusb_verify.h +++ b/src/common/tusb_verify.h @@ -53,11 +53,11 @@ * The difference in behavior is that ASSERT triggers a breakpoint while * verify does not. * - * #define TU_VERIFY(cond) if(cond) return false; - * #define TU_VERIFY(cond,ret) if(cond) return ret; + * #define TU_VERIFY(cond) if (!cond) return false; + * #define TU_VERIFY(cond,ret) if (!cond) return ret; * - * #define TU_ASSERT(cond) if(cond) {TU_MESS_FAILED(); TU_BREAKPOINT(), return false;} - * #define TU_ASSERT(cond,ret) if(cond) {TU_MESS_FAILED(); TU_BREAKPOINT(), return ret;} + * #define TU_ASSERT(cond) if (!cond) {TU_MESS_FAILED(); TU_BREAKPOINT(), return false;} + * #define TU_ASSERT(cond,ret) if (!cond) {TU_MESS_FAILED(); TU_BREAKPOINT(), return ret;} *------------------------------------------------------------------*/ #ifdef __cplusplus