aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-06-16 12:56:07 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-06-16 12:56:07 -0700
commitf5bbff9c8e314e29e12e9891c75908f60d941a5f (patch)
treed6e0d99723fc60f256b19b33de1b9b2c27f6dbd4 /src/cpp
parent905227049b494d6ecd3e8bf4ae0f00e3f499f0cf (diff)
Fix portability issues.
Diffstat (limited to 'src/cpp')
-rw-r--r--src/cpp/common/channel_filter.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cpp/common/channel_filter.cc b/src/cpp/common/channel_filter.cc
index 86df47903f..f81a01c62d 100644
--- a/src/cpp/common/channel_filter.cc
+++ b/src/cpp/common/channel_filter.cc
@@ -73,13 +73,14 @@ void ChannelData::StartTransportOp(grpc_exec_ctx *exec_ctx,
namespace internal {
-std::vector<FilterRecord> *channel_filters = nullptr;
+// Note: Implicitly initialized to nullptr due to static lifetime.
+std::vector<FilterRecord> *channel_filters;
namespace {
bool MaybeAddFilter(grpc_channel_stack_builder *builder, void *arg) {
const FilterRecord &filter = *(FilterRecord *)arg;
- if (filter.include_filter != nullptr) {
+ if (filter.include_filter) {
const grpc_channel_args *args =
grpc_channel_stack_builder_get_channel_arguments(builder);
if (!filter.include_filter(*args)) return true;