From f67a2a46931028753364ab6bcb6a43c12f8303b2 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 12 Aug 2021 02:15:30 +0200 Subject: assert: Tell the compiler that failures are unlikely --- kern/assert.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kern') diff --git a/kern/assert.h b/kern/assert.h index 73e2a176..fed2a204 100644 --- a/kern/assert.h +++ b/kern/assert.h @@ -40,7 +40,7 @@ extern void Assert(const char *exp, const char *filename, int line, const char *fun) __attribute__ ((noreturn)); #define assert(ex) \ - ((ex) \ + (likely(ex) \ ? (void) (0) \ : Assert (#ex, __FILE__, __LINE__, __FUNCTION__)) -- cgit v1.2.3