From 26e69f6534f0ce6f122f397b4682d5aff97a7605 Mon Sep 17 00:00:00 2001
From: Craig Tiller <ctiller@google.com>
Date: Wed, 24 May 2017 15:09:23 -0700
Subject: [PATCH] clang-format

---
 .../filters/client_channel/client_channel.c   | 23 +++++++++++--------
 .../resolvers/fake_resolver_test.c            | 12 ++++++----
 test/core/iomgr/endpoint_tests.c              |  6 +++--
 3 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/src/core/ext/filters/client_channel/client_channel.c b/src/core/ext/filters/client_channel/client_channel.c
index a0813d00b3..67b011aff3 100644
--- a/src/core/ext/filters/client_channel/client_channel.c
+++ b/src/core/ext/filters/client_channel/client_channel.c
@@ -822,11 +822,12 @@ static bool set_call_or_error(call_data *p, call_or_error coe) {
   }
   GPR_ASSERT(existing.subchannel_call == NULL);
   if (coe.error != GRPC_ERROR_NONE) {
-	  GPR_ASSERT(coe.subchannel_call == NULL);
-	  gpr_atm_rel_store(&p->subchannel_call_or_error, 1|(gpr_atm)coe.error);
+    GPR_ASSERT(coe.subchannel_call == NULL);
+    gpr_atm_rel_store(&p->subchannel_call_or_error, 1 | (gpr_atm)coe.error);
   } else {
-     GPR_ASSERT(coe.subchannel_call != NULL);
-     gpr_atm_rel_store(&p->subchannel_call_or_error, (gpr_atm)coe.subchannel_call);
+    GPR_ASSERT(coe.subchannel_call != NULL);
+    gpr_atm_rel_store(&p->subchannel_call_or_error,
+                      (gpr_atm)coe.subchannel_call);
   }
   return true;
 }
@@ -973,7 +974,8 @@ static void subchannel_ready_locked(grpc_exec_ctx *exec_ctx, void *arg,
         .context = calld->subchannel_call_context};
     grpc_error *new_error = grpc_connected_subchannel_create_call(
         exec_ctx, calld->connected_subchannel, &call_args, &subchannel_call);
-    GPR_ASSERT(set_call_or_error(calld, (call_or_error){.subchannel_call = subchannel_call}));
+    GPR_ASSERT(set_call_or_error(
+        calld, (call_or_error){.subchannel_call = subchannel_call}));
     if (new_error != GRPC_ERROR_NONE) {
       new_error = grpc_error_add_child(new_error, error);
       fail_locked(exec_ctx, calld, new_error);
@@ -1176,7 +1178,7 @@ static void start_transport_stream_op_batch_locked_inner(
       fail_locked(exec_ctx, calld, GRPC_ERROR_REF(error));
     }
     grpc_transport_stream_op_batch_finish_with_failure(exec_ctx, op,
-                                                      GRPC_ERROR_REF(error));
+                                                       GRPC_ERROR_REF(error));
     /* early out */
     return;
   }
@@ -1201,9 +1203,11 @@ static void start_transport_stream_op_batch_locked_inner(
       if (calld->connected_subchannel == NULL) {
         grpc_error *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
             "Call dropped by load balancing policy");
-	set_call_or_error(calld, (call_or_error){.error = GRPC_ERROR_REF(error)});
+        set_call_or_error(calld,
+                          (call_or_error){.error = GRPC_ERROR_REF(error)});
         fail_locked(exec_ctx, calld, GRPC_ERROR_REF(error));
-        grpc_transport_stream_op_batch_finish_with_failure(exec_ctx, op, GRPC_ERROR_REF(error));
+        grpc_transport_stream_op_batch_finish_with_failure(
+            exec_ctx, op, GRPC_ERROR_REF(error));
         return;  // Early out.
       }
     } else {
@@ -1223,7 +1227,8 @@ static void start_transport_stream_op_batch_locked_inner(
         .context = calld->subchannel_call_context};
     grpc_error *error = grpc_connected_subchannel_create_call(
         exec_ctx, calld->connected_subchannel, &call_args, &subchannel_call);
-    GPR_ASSERT(set_call_or_error(calld, (call_or_error){.subchannel_call = subchannel_call}));
+    GPR_ASSERT(set_call_or_error(
+        calld, (call_or_error){.subchannel_call = subchannel_call}));
     if (error != GRPC_ERROR_NONE) {
       fail_locked(exec_ctx, calld, GRPC_ERROR_REF(error));
       grpc_transport_stream_op_batch_finish_with_failure(exec_ctx, op, error);
diff --git a/test/core/client_channel/resolvers/fake_resolver_test.c b/test/core/client_channel/resolvers/fake_resolver_test.c
index 88ff4f9b56..934fb1b074 100644
--- a/test/core/client_channel/resolvers/fake_resolver_test.c
+++ b/test/core/client_channel/resolvers/fake_resolver_test.c
@@ -83,7 +83,7 @@ void on_resolution_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
       grpc_lb_addresses_cmp(actual_lb_addresses, expected_lb_addresses) == 0);
   grpc_channel_args_destroy(exec_ctx, res->resolver_result);
   grpc_channel_args_destroy(exec_ctx, res->expected_resolver_result);
-  gpr_event_set(&res->ev, (void*)1);
+  gpr_event_set(&res->ev, (void *)1);
 }
 
 static void test_fake_resolver() {
@@ -126,7 +126,8 @@ static void test_fake_resolver() {
   grpc_resolver_next_locked(&exec_ctx, resolver, &on_res_arg.resolver_result,
                             on_resolution);
   grpc_exec_ctx_flush(&exec_ctx);
-  GPR_ASSERT(gpr_event_wait(&on_res_arg.ev, grpc_timeout_seconds_to_deadline(5)) != NULL);
+  GPR_ASSERT(gpr_event_wait(&on_res_arg.ev,
+                            grpc_timeout_seconds_to_deadline(5)) != NULL);
 
   // Setup update.
   grpc_uri *uris_update[] = {
@@ -161,7 +162,8 @@ static void test_fake_resolver() {
   grpc_resolver_next_locked(&exec_ctx, resolver,
                             &on_res_arg_update.resolver_result, on_resolution);
   grpc_exec_ctx_flush(&exec_ctx);
-  GPR_ASSERT(gpr_event_wait(&on_res_arg_update.ev, grpc_timeout_seconds_to_deadline(5)) != NULL);
+  GPR_ASSERT(gpr_event_wait(&on_res_arg_update.ev,
+                            grpc_timeout_seconds_to_deadline(5)) != NULL);
 
   // Requesting a new resolution without re-senting the response shouldn't
   // trigger the resolution callback.
@@ -169,7 +171,9 @@ static void test_fake_resolver() {
   grpc_resolver_next_locked(&exec_ctx, resolver, &on_res_arg.resolver_result,
                             on_resolution);
   grpc_exec_ctx_flush(&exec_ctx);
-  GPR_ASSERT(gpr_event_wait(&on_res_arg.ev, grpc_timeout_milliseconds_to_deadline(100)) == NULL);
+  GPR_ASSERT(gpr_event_wait(&on_res_arg.ev,
+                            grpc_timeout_milliseconds_to_deadline(100)) ==
+             NULL);
 
   GRPC_COMBINER_UNREF(&exec_ctx, combiner, "test_fake_resolver");
   GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test_fake_resolver");
diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c
index 400a79fd33..6f86d40a29 100644
--- a/test/core/iomgr/endpoint_tests.c
+++ b/test/core/iomgr/endpoint_tests.c
@@ -276,11 +276,13 @@ static void wait_for_fail_count(grpc_exec_ctx *exec_ctx, int *fail_count,
   grpc_exec_ctx_flush(exec_ctx);
   gpr_mu_lock(g_mu);
   gpr_timespec deadline = grpc_timeout_seconds_to_deadline(10);
-  while (gpr_time_cmp(gpr_now(deadline.clock_type), deadline) < 0 && *fail_count < want_fail_count) {
+  while (gpr_time_cmp(gpr_now(deadline.clock_type), deadline) < 0 &&
+         *fail_count < want_fail_count) {
     grpc_pollset_worker *worker = NULL;
     GPR_ASSERT(GRPC_LOG_IF_ERROR(
         "pollset_work",
-        grpc_pollset_work(exec_ctx, g_pollset, &worker, gpr_now(deadline.clock_type), deadline)));
+        grpc_pollset_work(exec_ctx, g_pollset, &worker,
+                          gpr_now(deadline.clock_type), deadline)));
     gpr_mu_unlock(g_mu);
     grpc_exec_ctx_flush(exec_ctx);
     gpr_mu_lock(g_mu);
-- 
GitLab