summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-08-12 02:15:30 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-08-12 02:15:30 +0200
commitf67a2a46931028753364ab6bcb6a43c12f8303b2 (patch)
treeac78a6479ed5d843d12e441d9104c99961efbbab /kern
parenta277e247660a38c5e10c7ddc7916954f8283c8eb (diff)
assert: Tell the compiler that failures are unlikely
Diffstat (limited to 'kern')
-rw-r--r--kern/assert.h2
1 files changed, 1 insertions, 1 deletions
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__))