aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/workarounds
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-05-09 18:03:07 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-05-09 18:03:07 -0700
commitfac9d9e5b1fbedebe57dee0d3b42c4da094d4785 (patch)
treec7006f6df5009a780310edee89f828d30858058b /src/core/ext/filters/workarounds
parente74b9aeaa2987f8813d431684a30c675fd4b3acd (diff)
Address comment - simplify code
Diffstat (limited to 'src/core/ext/filters/workarounds')
-rw-r--r--src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
index 41a91204b2..af30d21141 100644
--- a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
+++ b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
@@ -208,12 +208,7 @@ static bool register_workaround_cronet_compression(
if (a == NULL) {
return true;
}
- if (a->type != GRPC_ARG_INTEGER) {
- gpr_log(GPR_ERROR, "%s ignored: it must be an integer",
- GRPC_ARG_WORKAROUND_CRONET_COMPRESSION);
- return true;
- }
- if (a->value.integer == 0) {
+ if (grpc_channel_arg_get_bool(a, false) == false) {
return true;
}
grpc_enable_workaround(GRPC_WORKAROUND_ID_CRONET_COMPRESSION);