Merge pull request #7043 from kpayson64/clang_format

Fix clang formatting
pull/7070/merge
Jan Tattermusch 9 years ago committed by GitHub
commit 5e6b9ba848
  1. 7
      src/core/ext/client_config/channel_connectivity.c
  2. 8
      src/core/lib/profiling/basic_timers.c
  3. 6
      src/core/lib/security/credentials/jwt/jwt_credentials.c
  4. 16
      src/core/lib/surface/channel.c
  5. 14
      src/core/lib/surface/completion_queue.c
  6. 2
      src/core/lib/transport/transport_op_string.c

@ -189,10 +189,11 @@ void grpc_channel_watch_connectivity_state(
GRPC_API_TRACE( GRPC_API_TRACE(
"grpc_channel_watch_connectivity_state(" "grpc_channel_watch_connectivity_state("
"channel=%p, last_observed_state=%d, " "channel=%p, last_observed_state=%d, "
"deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "deadline=gpr_timespec { tv_sec: %" PRId64
", tv_nsec: %d, clock_type: %d }, "
"cq=%p, tag=%p)", "cq=%p, tag=%p)",
7, (channel, (int)last_observed_state, deadline.tv_sec, 7, (channel, (int)last_observed_state, deadline.tv_sec, deadline.tv_nsec,
deadline.tv_nsec, (int)deadline.clock_type, cq, tag)); (int)deadline.clock_type, cq, tag));
grpc_cq_begin_op(cq, tag); grpc_cq_begin_op(cq, tag);

@ -141,11 +141,11 @@ static void write_log(gpr_timer_log *log) {
entry->tm = gpr_time_0(entry->tm.clock_type); entry->tm = gpr_time_0(entry->tm.clock_type);
} }
fprintf(output_file, fprintf(output_file,
"{\"t\": %"PRId64".%09d, \"thd\": \"%d\", \"type\": \"%c\", \"tag\": " "{\"t\": %" PRId64
".%09d, \"thd\": \"%d\", \"type\": \"%c\", \"tag\": "
"\"%s\", \"file\": \"%s\", \"line\": %d, \"imp\": %d}\n", "\"%s\", \"file\": \"%s\", \"line\": %d, \"imp\": %d}\n",
entry->tm.tv_sec, entry->tm.tv_nsec, entry->thd, entry->tm.tv_sec, entry->tm.tv_nsec, entry->thd, entry->type,
entry->type, entry->tagstr, entry->file, entry->line, entry->tagstr, entry->file, entry->line, entry->important);
entry->important);
} }
} }

@ -150,10 +150,10 @@ grpc_call_credentials *grpc_service_account_jwt_access_credentials_create(
"grpc_service_account_jwt_access_credentials_create(" "grpc_service_account_jwt_access_credentials_create("
"json_key=%s, " "json_key=%s, "
"token_lifetime=" "token_lifetime="
"gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "gpr_timespec { tv_sec: %" PRId64
", tv_nsec: %d, clock_type: %d }, "
"reserved=%p)", "reserved=%p)",
5, 5, (json_key, token_lifetime.tv_sec, token_lifetime.tv_nsec,
(json_key, token_lifetime.tv_sec, token_lifetime.tv_nsec,
(int)token_lifetime.clock_type, reserved)); (int)token_lifetime.clock_type, reserved));
GPR_ASSERT(reserved == NULL); GPR_ASSERT(reserved == NULL);
return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( return grpc_service_account_jwt_access_credentials_create_from_auth_json_key(

@ -223,11 +223,12 @@ grpc_call *grpc_channel_create_call(grpc_channel *channel,
"grpc_channel_create_call(" "grpc_channel_create_call("
"channel=%p, parent_call=%p, propagation_mask=%x, cq=%p, method=%s, " "channel=%p, parent_call=%p, propagation_mask=%x, cq=%p, method=%s, "
"host=%s, " "host=%s, "
"deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "deadline=gpr_timespec { tv_sec: %" PRId64
", tv_nsec: %d, clock_type: %d }, "
"reserved=%p)", "reserved=%p)",
10, (channel, parent_call, (unsigned)propagation_mask, cq, method, host, 10,
deadline.tv_sec, deadline.tv_nsec, (channel, parent_call, (unsigned)propagation_mask, cq, method, host,
(int)deadline.clock_type, reserved)); deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, reserved));
GPR_ASSERT(!reserved); GPR_ASSERT(!reserved);
return grpc_channel_create_call_internal( return grpc_channel_create_call_internal(
channel, parent_call, propagation_mask, cq, NULL, channel, parent_call, propagation_mask, cq, NULL,
@ -282,11 +283,12 @@ grpc_call *grpc_channel_create_registered_call(
"grpc_channel_create_registered_call(" "grpc_channel_create_registered_call("
"channel=%p, parent_call=%p, propagation_mask=%x, completion_queue=%p, " "channel=%p, parent_call=%p, propagation_mask=%x, completion_queue=%p, "
"registered_call_handle=%p, " "registered_call_handle=%p, "
"deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "deadline=gpr_timespec { tv_sec: %" PRId64
", tv_nsec: %d, clock_type: %d }, "
"reserved=%p)", "reserved=%p)",
9, (channel, parent_call, (unsigned)propagation_mask, completion_queue, 9, (channel, parent_call, (unsigned)propagation_mask, completion_queue,
registered_call_handle, deadline.tv_sec, registered_call_handle, deadline.tv_sec, deadline.tv_nsec,
deadline.tv_nsec, (int)deadline.clock_type, reserved)); (int)deadline.clock_type, reserved));
GPR_ASSERT(!reserved); GPR_ASSERT(!reserved);
return grpc_channel_create_call_internal( return grpc_channel_create_call_internal(
channel, parent_call, propagation_mask, completion_queue, NULL, channel, parent_call, propagation_mask, completion_queue, NULL,

@ -316,10 +316,11 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc,
GRPC_API_TRACE( GRPC_API_TRACE(
"grpc_completion_queue_next(" "grpc_completion_queue_next("
"cc=%p, " "cc=%p, "
"deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "deadline=gpr_timespec { tv_sec: %" PRId64
", tv_nsec: %d, clock_type: %d }, "
"reserved=%p)", "reserved=%p)",
5, (cc, deadline.tv_sec, deadline.tv_nsec, 5, (cc, deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type,
(int)deadline.clock_type, reserved)); reserved));
GPR_ASSERT(!reserved); GPR_ASSERT(!reserved);
deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC);
@ -428,10 +429,11 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag,
GRPC_API_TRACE( GRPC_API_TRACE(
"grpc_completion_queue_pluck(" "grpc_completion_queue_pluck("
"cc=%p, tag=%p, " "cc=%p, tag=%p, "
"deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "deadline=gpr_timespec { tv_sec: %" PRId64
", tv_nsec: %d, clock_type: %d }, "
"reserved=%p)", "reserved=%p)",
6, (cc, tag, deadline.tv_sec, deadline.tv_nsec, 6, (cc, tag, deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type,
(int)deadline.clock_type, reserved)); reserved));
GPR_ASSERT(!reserved); GPR_ASSERT(!reserved);
deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC);

@ -63,7 +63,7 @@ static void put_metadata_list(gpr_strvec *b, grpc_metadata_batch md) {
} }
if (gpr_time_cmp(md.deadline, gpr_inf_future(md.deadline.clock_type)) != 0) { if (gpr_time_cmp(md.deadline, gpr_inf_future(md.deadline.clock_type)) != 0) {
char *tmp; char *tmp;
gpr_asprintf(&tmp, " deadline=%"PRId64".%09d", md.deadline.tv_sec, gpr_asprintf(&tmp, " deadline=%" PRId64 ".%09d", md.deadline.tv_sec,
md.deadline.tv_nsec); md.deadline.tv_nsec);
gpr_strvec_add(b, tmp); gpr_strvec_add(b, tmp);
} }

Loading…
Cancel
Save