From fd2ddd28a974fe7d286d36e28a52a573623d25a2 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 7 Oct 2016 10:11:10 -0700 Subject: [PATCH] clang-format --- src/core/ext/client_config/client_channel.c | 5 +- test/core/channel/channel_stack_test.c | 6 +- test/core/end2end/end2end_tests.h | 3 +- test/core/end2end/fixtures/h2_ssl_cert.c | 70 ++++++++++---------- test/core/end2end/tests/max_message_length.c | 10 +-- 5 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 6f2b32fb509..0d243768ef2 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -611,9 +611,8 @@ static void continue_picking(grpc_exec_ctx *exec_ctx, void *arg, call_data *calld = cpa->elem->call_data; gpr_mu_lock(&calld->mu); if (pick_subchannel(exec_ctx, cpa->elem, cpa->initial_metadata, - cpa->initial_metadata_flags, - cpa->connected_subchannel, cpa->on_ready, - GRPC_ERROR_NONE)) { + cpa->initial_metadata_flags, cpa->connected_subchannel, + cpa->on_ready, GRPC_ERROR_NONE)) { grpc_exec_ctx_sched(exec_ctx, cpa->on_ready, GRPC_ERROR_NONE, NULL); } gpr_mu_unlock(&calld->mu); diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index df7dfe5c0b0..26fc3dc4a85 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -118,7 +118,7 @@ static void test_create_channel_stack(void) { int *channel_data; int *call_data; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_mdstr* path = grpc_mdstr_from_string("/service/method"); + grpc_mdstr *path = grpc_mdstr_from_string("/service/method"); arg.type = GRPC_ARG_INTEGER; arg.key = "test_key"; @@ -137,8 +137,8 @@ static void test_create_channel_stack(void) { call_stack = gpr_malloc(channel_stack->call_stack_size); grpc_error *error = grpc_call_stack_init( - &exec_ctx, channel_stack, 1, free_call, call_stack, NULL, NULL, - path, gpr_inf_future(GPR_CLOCK_MONOTONIC), call_stack); + &exec_ctx, channel_stack, 1, free_call, call_stack, NULL, NULL, path, + gpr_inf_future(GPR_CLOCK_MONOTONIC), call_stack); GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(call_stack->count == 1); call_elem = grpc_call_stack_element(call_stack, 0); diff --git a/test/core/end2end/end2end_tests.h b/test/core/end2end/end2end_tests.h index 2230027a45e..e20273de90e 100644 --- a/test/core/end2end/end2end_tests.h +++ b/test/core/end2end/end2end_tests.h @@ -60,8 +60,7 @@ struct grpc_end2end_test_config { grpc_end2end_test_fixture (*create_fixture)(grpc_channel_args *client_args, grpc_channel_args *server_args); void (*init_client)(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args); + grpc_channel_args *client_args, const char *query_args); void (*init_server)(grpc_end2end_test_fixture *f, grpc_channel_args *server_args); void (*tear_down_data)(grpc_end2end_test_fixture *f); diff --git a/test/core/end2end/fixtures/h2_ssl_cert.c b/test/core/end2end/fixtures/h2_ssl_cert.c index 69d23fa22c7..4c2f5f535e7 100644 --- a/test/core/end2end/fixtures/h2_ssl_cert.c +++ b/test/core/end2end/fixtures/h2_ssl_cert.c @@ -154,41 +154,41 @@ SERVER_INIT(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY) typedef enum { NONE, SELF_SIGNED, SIGNED, BAD_CERT_PAIR } certtype; -#define CLIENT_INIT(cert_type) \ - static void CLIENT_INIT_NAME(cert_type)(grpc_end2end_test_fixture * f, \ - grpc_channel_args * client_args, \ - const char *query_args) { \ - GPR_ASSERT(query_args == NULL); \ - grpc_channel_credentials *ssl_creds = NULL; \ - grpc_ssl_pem_key_cert_pair self_signed_client_key_cert_pair = { \ - test_self_signed_client_key, test_self_signed_client_cert}; \ - grpc_ssl_pem_key_cert_pair signed_client_key_cert_pair = { \ - test_signed_client_key, test_signed_client_cert}; \ - grpc_ssl_pem_key_cert_pair bad_client_key_cert_pair = { \ - test_self_signed_client_key, test_signed_client_cert}; \ - grpc_ssl_pem_key_cert_pair *key_cert_pair = NULL; \ - switch (cert_type) { \ - case SELF_SIGNED: \ - key_cert_pair = &self_signed_client_key_cert_pair; \ - break; \ - case SIGNED: \ - key_cert_pair = &signed_client_key_cert_pair; \ - break; \ - case BAD_CERT_PAIR: \ - key_cert_pair = &bad_client_key_cert_pair; \ - break; \ - default: \ - break; \ - } \ - ssl_creds = \ - grpc_ssl_credentials_create(test_root_cert, key_cert_pair, NULL); \ - grpc_arg ssl_name_override = {GRPC_ARG_STRING, \ - GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, \ - {"foo.test.google.fr"}}; \ - grpc_channel_args *new_client_args = \ - grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); \ - chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); \ - grpc_channel_args_destroy(new_client_args); \ +#define CLIENT_INIT(cert_type) \ + static void CLIENT_INIT_NAME(cert_type)(grpc_end2end_test_fixture * f, \ + grpc_channel_args * client_args, \ + const char *query_args) { \ + GPR_ASSERT(query_args == NULL); \ + grpc_channel_credentials *ssl_creds = NULL; \ + grpc_ssl_pem_key_cert_pair self_signed_client_key_cert_pair = { \ + test_self_signed_client_key, test_self_signed_client_cert}; \ + grpc_ssl_pem_key_cert_pair signed_client_key_cert_pair = { \ + test_signed_client_key, test_signed_client_cert}; \ + grpc_ssl_pem_key_cert_pair bad_client_key_cert_pair = { \ + test_self_signed_client_key, test_signed_client_cert}; \ + grpc_ssl_pem_key_cert_pair *key_cert_pair = NULL; \ + switch (cert_type) { \ + case SELF_SIGNED: \ + key_cert_pair = &self_signed_client_key_cert_pair; \ + break; \ + case SIGNED: \ + key_cert_pair = &signed_client_key_cert_pair; \ + break; \ + case BAD_CERT_PAIR: \ + key_cert_pair = &bad_client_key_cert_pair; \ + break; \ + default: \ + break; \ + } \ + ssl_creds = \ + grpc_ssl_credentials_create(test_root_cert, key_cert_pair, NULL); \ + grpc_arg ssl_name_override = {GRPC_ARG_STRING, \ + GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, \ + {"foo.test.google.fr"}}; \ + grpc_channel_args *new_client_args = \ + grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); \ + chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); \ + grpc_channel_args_destroy(new_client_args); \ } CLIENT_INIT(NONE) diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index 369bf10e46a..e698987a0a4 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -136,8 +136,9 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config, if (use_service_config) { // We don't currently support service configs on the server side. GPR_ASSERT(send_limit); - query_args = "method_name=/service/method" - "&max_request_message_bytes=5"; + query_args = + "method_name=/service/method" + "&max_request_message_bytes=5"; } else { // Set limit via channel args. channel_arg.key = send_limit ? GRPC_ARG_MAX_SEND_MESSAGE_LENGTH @@ -297,8 +298,9 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, if (use_service_config) { // We don't currently support service configs on the server side. GPR_ASSERT(!send_limit); - query_args = "method_name=/service/method" - "&max_response_message_bytes=5"; + query_args = + "method_name=/service/method" + "&max_response_message_bytes=5"; } else { // Set limit via channel args. channel_arg.key = send_limit ? GRPC_ARG_MAX_SEND_MESSAGE_LENGTH