diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-29 02:13:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-29 02:13:00 +0000 |
commit | ef9d9423cc008794eb5e005127365d6dd8000758 (patch) | |
tree | aab06a38bf624269ce06da937aec84b6be943ebf /internal.h | |
parent | 53e301a2d804919341b7012d58686edab5386116 (diff) | |
download | ruby-ef9d9423cc008794eb5e005127365d6dd8000758.tar.gz |
internal.h: ensure a boolean
* internal.h (LIKELY, UNLIKELY): make a boolean to enforce 1 or 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal.h b/internal.h index 58ff89763c..a9b3ee4824 100644 --- a/internal.h +++ b/internal.h @@ -25,8 +25,8 @@ extern "C" { /* likely */ #if __GNUC__ >= 3 -#define LIKELY(x) (__builtin_expect((x), 1)) -#define UNLIKELY(x) (__builtin_expect((x), 0)) +#define LIKELY(x) (__builtin_expect(!(x), 0)) +#define UNLIKELY(x) (__builtin_expect(!(x), 1)) #else /* __GNUC__ >= 3 */ #define LIKELY(x) (x) #define UNLIKELY(x) (x) |