diff options
author | Noah Eisen <ncteisen@google.com> | 2018-02-09 09:34:04 -0800 |
---|---|---|
committer | Noah Eisen <ncteisen@google.com> | 2018-02-09 09:34:04 -0800 |
commit | 4d20a666850b732cf1562487fb5f46ab9654105f (patch) | |
tree | 9059162d0f125e02780f506c2476d5d9bbc0eb7d /src/core/ext/filters/client_channel/subchannel_index.cc | |
parent | cddf6f838aa48c8d5c9f75cee5a8ed8abdcb25b9 (diff) |
Run clang fmt
Diffstat (limited to 'src/core/ext/filters/client_channel/subchannel_index.cc')
-rw-r--r-- | src/core/ext/filters/client_channel/subchannel_index.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/core/ext/filters/client_channel/subchannel_index.cc b/src/core/ext/filters/client_channel/subchannel_index.cc index 2deafb380b..d1dc5ee970 100644 --- a/src/core/ext/filters/client_channel/subchannel_index.cc +++ b/src/core/ext/filters/client_channel/subchannel_index.cc @@ -45,13 +45,14 @@ static bool g_force_creation = false; static grpc_subchannel_key* create_key( const grpc_subchannel_args* args, grpc_channel_args* (*copy_channel_args)(const grpc_channel_args* args)) { - grpc_subchannel_key* k = static_cast<grpc_subchannel_key*>(gpr_malloc(sizeof(*k))); + grpc_subchannel_key* k = + static_cast<grpc_subchannel_key*>(gpr_malloc(sizeof(*k))); k->args.filter_count = args->filter_count; if (k->args.filter_count > 0) { - k->args.filters = static_cast<const grpc_channel_filter**>(gpr_malloc( - sizeof(*k->args.filters) * k->args.filter_count)); - memcpy(reinterpret_cast<grpc_channel_filter*>(k->args.filters), args->filters, - sizeof(*k->args.filters) * k->args.filter_count); + k->args.filters = static_cast<const grpc_channel_filter**>( + gpr_malloc(sizeof(*k->args.filters) * k->args.filter_count)); + memcpy(reinterpret_cast<grpc_channel_filter*>(k->args.filters), + args->filters, sizeof(*k->args.filters) * k->args.filter_count); } else { k->args.filters = nullptr; } @@ -170,7 +171,8 @@ grpc_subchannel* grpc_subchannel_index_register(grpc_subchannel_key* key, gpr_mu_unlock(&g_mu); // - Check to see if a subchannel already exists - c = static_cast<grpc_subchannel*>(grpc_avl_get(index, key, grpc_core::ExecCtx::Get())); + c = static_cast<grpc_subchannel*>( + grpc_avl_get(index, key, grpc_core::ExecCtx::Get())); if (c != nullptr) { c = GRPC_SUBCHANNEL_REF_FROM_WEAK_REF(c, "index_register"); } @@ -220,8 +222,8 @@ void grpc_subchannel_index_unregister(grpc_subchannel_key* key, // Check to see if this key still refers to the previously // registered subchannel - grpc_subchannel* c = - static_cast<grpc_subchannel*>(grpc_avl_get(index, key, grpc_core::ExecCtx::Get())); + grpc_subchannel* c = static_cast<grpc_subchannel*>( + grpc_avl_get(index, key, grpc_core::ExecCtx::Get())); if (c != constructed) { grpc_avl_unref(index, grpc_core::ExecCtx::Get()); break; |