summaryrefslogtreecommitdiff
path: root/ucoolib
diff options
context:
space:
mode:
Diffstat (limited to 'ucoolib')
-rw-r--r--ucoolib/common.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/ucoolib/common.hh b/ucoolib/common.hh
index 8376389..4bedaa6 100644
--- a/ucoolib/common.hh
+++ b/ucoolib/common.hh
@@ -59,7 +59,7 @@ halt_perror () __attribute__ ((noreturn));
extern inline void
assert (bool condition)
{
- if (!condition)
+ if (!__builtin_expect (condition, 1))
halt ();
}
@@ -77,7 +77,7 @@ assert_unreachable ()
extern inline void
assert_perror (bool condition)
{
- if (!condition)
+ if (!__builtin_expect (condition, 1))
halt_perror ();
}