aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Austin Schuh <austin@peloton-tech.com>2015-06-05 18:49:25 -0700
committerGravatar Austin Schuh <austin@peloton-tech.com>2015-06-05 18:49:25 -0700
commitf4c8627edbc6ee823ec73003112f97b32403bd09 (patch)
tree6534b3d491440489dc3fc47b8ce998ac378e9eb7 /src
parent68975a4e5071c5159258770edceec925e73ca2de (diff)
Fixed bug in GOOGLE_PREDICT_FALSE.
The GOOGLE_PREDICT_FALSE macro is both incorrect, and doesn't match the macro definition in glog, which causes conflicts when including both libraries. This commit fixes that by making it identical to what is in glog.
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/stubs/common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h
index 3acaeba1..e4c35a2f 100644
--- a/src/google/protobuf/stubs/common.h
+++ b/src/google/protobuf/stubs/common.h
@@ -258,7 +258,7 @@ static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF);
#ifndef GOOGLE_PREDICT_FALSE
#ifdef __GNUC__
// Provided at least since GCC 3.0.
-#define GOOGLE_PREDICT_FALSE(x) (__builtin_expect(!!(x), 1))
+#define GOOGLE_PREDICT_FALSE(x) (__builtin_expect(x, 0))
#else
#define GOOGLE_PREDICT_FALSE
#endif