clang-format

pull/8267/head
Mark D. Roth 8 years ago
parent 94ba752883
commit 07aab59da9
  1. 5
      src/core/ext/client_config/client_channel.c
  2. 14
      src/core/ext/resolver/sockaddr/sockaddr_resolver.c
  3. 8
      test/core/end2end/fake_resolver.c

@ -189,7 +189,7 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg,
// Special case: If all of the addresses are balancer addresses,
// assume that we should use the grpclb policy, regardless of what the
// resolver actually specified.
const char* lb_policy_name =
const char *lb_policy_name =
grpc_resolver_result_get_lb_policy_name(chand->resolver_result);
bool found_backend_address = false;
for (size_t i = 0; i < lb_policy_args.addresses->num_addresses; ++i) {
@ -203,7 +203,8 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg,
gpr_log(GPR_INFO,
"resolver requested LB policy %s but provided only balancer "
"addresses, no backend addresses -- forcing use of grpclb LB "
"policy", (lb_policy_name == NULL ? "(none)" : lb_policy_name));
"policy",
(lb_policy_name == NULL ? "(none)" : lb_policy_name));
}
lb_policy_name = "grpclb";
}

@ -158,9 +158,10 @@ char *unix_get_default_authority(grpc_resolver_factory *factory,
static void do_nothing(void *ignored) {}
static grpc_resolver *sockaddr_create(
grpc_resolver_args *args,
int parse(grpc_uri *uri, struct sockaddr_storage *dst, size_t *len)) {
static grpc_resolver *sockaddr_create(grpc_resolver_args *args,
int parse(grpc_uri *uri,
struct sockaddr_storage *dst,
size_t *len)) {
if (0 != strcmp(args->uri->authority, "")) {
gpr_log(GPR_ERROR, "authority based uri's not supported by the %s scheme",
args->uri->scheme);
@ -178,9 +179,10 @@ static grpc_resolver *sockaddr_create(
grpc_uri ith_uri = *args->uri;
char *part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII);
ith_uri.path = part_str;
if (!parse(&ith_uri, (struct sockaddr_storage *)(&addresses->addresses[i]
.address.addr),
&addresses->addresses[i].address.len)) {
if (!parse(
&ith_uri,
(struct sockaddr_storage *)(&addresses->addresses[i].address.addr),
&addresses->addresses[i].address.len)) {
errors_found = true;
}
gpr_free(part_str);

@ -165,10 +165,10 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory,
grpc_uri ith_uri = *args->uri;
char* part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII);
ith_uri.path = part_str;
if (!parse_ipv4(&ith_uri,
(struct sockaddr_storage*)(&addresses->addresses[i]
.address.addr),
&addresses->addresses[i].address.len)) {
if (!parse_ipv4(
&ith_uri,
(struct sockaddr_storage*)(&addresses->addresses[i].address.addr),
&addresses->addresses[i].address.len)) {
errors_found = true;
}
gpr_free(part_str);

Loading…
Cancel
Save