From 977f5d4e7dc8bdf21bda2e8b9a7a232f88de8e73 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 30 Nov 2016 14:03:58 -0800 Subject: [PATCH] clang-format --- src/core/lib/channel/channel_stack_builder.c | 2 +- src/core/lib/surface/channel.c | 9 ++++----- src/cpp/common/channel_filter.h | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/core/lib/channel/channel_stack_builder.c b/src/core/lib/channel/channel_stack_builder.c index f54eac06ec6..b959517afb3 100644 --- a/src/core/lib/channel/channel_stack_builder.c +++ b/src/core/lib/channel/channel_stack_builder.c @@ -266,7 +266,7 @@ grpc_error *grpc_channel_stack_builder_finish( } else { // run post-initialization functions i = 0; - for (filter_node *p = builder->begin.next; p != &builder->end;\ + for (filter_node *p = builder->begin.next; p != &builder->end; p = p->next) { if (p->init != NULL) { p->init(channel_stack, grpc_channel_stack_element(channel_stack, i), diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 72e64a2076d..9405015c501 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -101,7 +101,7 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, exec_ctx, builder, sizeof(grpc_channel), 1, destroy_channel, NULL, (void **)&channel); if (error != GRPC_ERROR_NONE) { - const char* msg = grpc_error_string(error); + const char *msg = grpc_error_string(error); gpr_log(GPR_ERROR, "channel stack builder failed: %s", msg); grpc_error_free_string(msg); GRPC_ERROR_UNREF(error); @@ -126,8 +126,8 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, /* setting this takes precedence over anything else */ GRPC_MDELEM_UNREF(channel->default_authority); } - channel->default_authority = grpc_mdelem_from_strings( - ":authority", args->args[i].value.string); + channel->default_authority = + grpc_mdelem_from_strings(":authority", args->args[i].value.string); } } else if (0 == strcmp(args->args[i].key, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG)) { @@ -156,8 +156,7 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM)) { channel->compression_options.default_algorithm.is_set = true; GPR_ASSERT(args->args[i].value.integer >= 0 && - args->args[i].value.integer < - GRPC_COMPRESS_ALGORITHMS_COUNT); + args->args[i].value.integer < GRPC_COMPRESS_ALGORITHMS_COUNT); channel->compression_options.default_algorithm.algorithm = (grpc_compression_algorithm)args->args[i].value.integer; } else if (0 == diff --git a/src/cpp/common/channel_filter.h b/src/cpp/common/channel_filter.h index 6bda74b9be7..107522ea04a 100644 --- a/src/cpp/common/channel_filter.h +++ b/src/cpp/common/channel_filter.h @@ -287,7 +287,7 @@ class ChannelFilter final { ? grpc_transport_get_peer(exec_ctx, args->optional_transport) : nullptr; // Construct the object in the already-allocated memory. - ChannelDataType* channel_data = + ChannelDataType *channel_data = new (elem->channel_data) ChannelDataType(*args->channel_args, peer); return channel_data->Init(); }