aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/client_config
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-22 09:30:46 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-22 09:30:46 -0700
commitaf73d78b7838deb94673815ba3c1b0ebcadc5927 (patch)
treeca9006af480237647cada1e8b833f2d9106960b8 /src/core/client_config
parentd9ccbbf6b98721f3e0256436e8a31fb378324d34 (diff)
clang-format all core files
Diffstat (limited to 'src/core/client_config')
-rw-r--r--src/core/client_config/lb_policies/pick_first.c3
-rw-r--r--src/core/client_config/lb_policy_registry.c6
-rw-r--r--src/core/client_config/resolvers/sockaddr_resolver.c7
-rw-r--r--src/core/client_config/resolvers/zookeeper_resolver.c3
4 files changed, 9 insertions, 10 deletions
diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c
index 39e9e6c0d7..7557053711 100644
--- a/src/core/client_config/lb_policies/pick_first.c
+++ b/src/core/client_config/lb_policies/pick_first.c
@@ -337,7 +337,8 @@ static grpc_lb_policy *create_pick_first(grpc_lb_policy_factory *factory,
GPR_ASSERT(args->num_subchannels > 0);
memset(p, 0, sizeof(*p));
grpc_lb_policy_init(&p->base, &pick_first_lb_policy_vtable);
- p->subchannels = gpr_malloc(sizeof(grpc_subchannel *) * args->num_subchannels);
+ p->subchannels =
+ gpr_malloc(sizeof(grpc_subchannel *) * args->num_subchannels);
p->num_subchannels = args->num_subchannels;
grpc_connectivity_state_init(&p->state_tracker, GRPC_CHANNEL_IDLE,
"pick_first");
diff --git a/src/core/client_config/lb_policy_registry.c b/src/core/client_config/lb_policy_registry.c
index ae4a077ef3..fc302e82d7 100644
--- a/src/core/client_config/lb_policy_registry.c
+++ b/src/core/client_config/lb_policy_registry.c
@@ -65,7 +65,7 @@ void grpc_register_lb_policy(grpc_lb_policy_factory *factory) {
g_all_of_the_lb_policies[g_number_of_lb_policies++] = factory;
}
-static grpc_lb_policy_factory *lookup_factory(const char* name) {
+static grpc_lb_policy_factory *lookup_factory(const char *name) {
int i;
if (name == NULL) return NULL;
@@ -82,7 +82,7 @@ static grpc_lb_policy_factory *lookup_factory(const char* name) {
grpc_lb_policy *grpc_lb_policy_create(const char *name,
grpc_lb_policy_args *args) {
grpc_lb_policy_factory *factory = lookup_factory(name);
- grpc_lb_policy *lb_policy = grpc_lb_policy_factory_create_lb_policy(
- factory, args);
+ grpc_lb_policy *lb_policy =
+ grpc_lb_policy_factory_create_lb_policy(factory, args);
return lb_policy;
}
diff --git a/src/core/client_config/resolvers/sockaddr_resolver.c b/src/core/client_config/resolvers/sockaddr_resolver.c
index da6b5518f8..378813f45b 100644
--- a/src/core/client_config/resolvers/sockaddr_resolver.c
+++ b/src/core/client_config/resolvers/sockaddr_resolver.c
@@ -146,8 +146,7 @@ static void sockaddr_maybe_finish_next_locked(sockaddr_resolver *r,
memset(&lb_policy_args, 0, sizeof(lb_policy_args));
lb_policy_args.subchannels = subchannels;
lb_policy_args.num_subchannels = r->num_addrs;
- lb_policy =
- grpc_lb_policy_create(r->lb_policy_name, &lb_policy_args);
+ lb_policy = grpc_lb_policy_create(r->lb_policy_name, &lb_policy_args);
gpr_free(subchannels);
grpc_client_config_set_lb_policy(cfg, lb_policy);
GRPC_LB_POLICY_UNREF(lb_policy, "sockaddr", closure_list);
@@ -333,9 +332,9 @@ static grpc_resolver *sockaddr_create(
r->addrs = gpr_malloc(sizeof(struct sockaddr_storage) * r->num_addrs);
r->addrs_len = gpr_malloc(sizeof(*r->addrs_len) * r->num_addrs);
- for(i = 0; i < r->num_addrs; i++) {
+ for (i = 0; i < r->num_addrs; i++) {
grpc_uri ith_uri = *args->uri;
- char* part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII);
+ char *part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII);
ith_uri.path = part_str;
if (!parse(&ith_uri, &r->addrs[i], &r->addrs_len[i])) {
errors_found = 1; /* GPR_TRUE */
diff --git a/src/core/client_config/resolvers/zookeeper_resolver.c b/src/core/client_config/resolvers/zookeeper_resolver.c
index c785e76939..db2bf7552f 100644
--- a/src/core/client_config/resolvers/zookeeper_resolver.c
+++ b/src/core/client_config/resolvers/zookeeper_resolver.c
@@ -202,8 +202,7 @@ static void zookeeper_on_resolved(void *arg,
}
lb_policy_args.subchannels = subchannels;
lb_policy_args.num_subchannels = addresses->naddrs;
- lb_policy =
- grpc_lb_policy_create(r->lb_policy_name, &lb_policy_args);
+ lb_policy = grpc_lb_policy_create(r->lb_policy_name, &lb_policy_args);
grpc_client_config_set_lb_policy(config, lb_policy);
GRPC_LB_POLICY_UNREF(lb_policy, "construction");
grpc_resolved_addresses_destroy(addresses);