aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2015-06-06 00:39:12 -0700
committerFeng Xiao <xfxyjwf@gmail.com>2015-06-06 00:39:12 -0700
commitf51f1b7bb6746bc8b4a286543d1fc2d10512ed87 (patch)
tree7b8ecfbb4e8a173d98685f4e9bb2a22706074ddd
parentdffd542bb8d45f6846a65864a39674669915fce6 (diff)
parentf4c8627edbc6ee823ec73003112f97b32403bd09 (diff)
downloadprotobuf-f51f1b7bb6746bc8b4a286543d1fc2d10512ed87.tar.gz
protobuf-f51f1b7bb6746bc8b4a286543d1fc2d10512ed87.tar.bz2
protobuf-f51f1b7bb6746bc8b4a286543d1fc2d10512ed87.zip
Merge pull request #467 from AustinSchuh/GOOGLE_PREDICT_FALSE
Fixed bug in GOOGLE_PREDICT_FALSE.
-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