aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-12-14 12:02:50 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-12-14 12:02:50 -0800
commit620e965c1b522173aaf2d12e9fcf9c8f5d8754be (patch)
tree18c3f9810487b1ec69a7f2a6b70c4963824b2d46 /src
parentf35f9257bf145ddf9c56bfaed8a4c3c86873e920 (diff)
clang-format after last weeks test-fest
Diffstat (limited to 'src')
-rw-r--r--src/core/census/context.h2
-rw-r--r--src/core/compression/message_compress.c8
-rw-r--r--src/core/iomgr/pollset_posix.c5
-rw-r--r--src/core/iomgr/tcp_windows.c5
-rw-r--r--src/core/json/json_reader.c2
-rw-r--r--src/core/security/credentials.c5
-rw-r--r--src/core/support/time_posix.c2
-rw-r--r--src/core/surface/call_log_batch.c1
-rw-r--r--src/core/surface/channel.c8
-rw-r--r--src/core/surface/completion_queue.c4
-rw-r--r--src/core/surface/server_create.c3
-rw-r--r--src/core/transport/chttp2/frame_data.c2
-rw-r--r--src/core/transport/chttp2/frame_settings.c7
-rw-r--r--src/core/transport/chttp2/hpack_encoder.c5
-rw-r--r--src/core/transport/chttp2/varint.h3
15 files changed, 31 insertions, 31 deletions
diff --git a/src/core/census/context.h b/src/core/census/context.h
index 02b3ec2545..700bcf86cf 100644
--- a/src/core/census/context.h
+++ b/src/core/census/context.h
@@ -41,7 +41,7 @@
/* census_context is the in-memory representation of information needed to
* maintain tracing, RPC statistics and resource usage information. */
struct census_context {
- census_tag_set *tags; /* Opaque data structure for census tags. */
+ census_tag_set *tags; /* Opaque data structure for census tags. */
};
#endif /* GRPC_INTERNAL_CORE_CENSUS_CONTEXT_H */
diff --git a/src/core/compression/message_compress.c b/src/core/compression/message_compress.c
index e72347118f..edc21a9eb7 100644
--- a/src/core/compression/message_compress.c
+++ b/src/core/compression/message_compress.c
@@ -91,13 +91,11 @@ error:
return 0;
}
-static void *zalloc_gpr(void* opaque, unsigned int items, unsigned int size) {
+static void* zalloc_gpr(void* opaque, unsigned int items, unsigned int size) {
return gpr_malloc(items * size);
}
-static void zfree_gpr(void* opaque, void *address) {
- gpr_free(address);
-}
+static void zfree_gpr(void* opaque, void* address) { gpr_free(address); }
static int zlib_compress(gpr_slice_buffer* input, gpr_slice_buffer* output,
int gzip) {
@@ -157,7 +155,7 @@ static int copy(gpr_slice_buffer* input, gpr_slice_buffer* output) {
}
static int compress_inner(grpc_compression_algorithm algorithm,
- gpr_slice_buffer* input, gpr_slice_buffer* output) {
+ gpr_slice_buffer* input, gpr_slice_buffer* output) {
switch (algorithm) {
case GRPC_COMPRESS_NONE:
/* the fallback path always needs to be send uncompressed: we simply
diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c
index b303f9d5bd..9195344758 100644
--- a/src/core/iomgr/pollset_posix.c
+++ b/src/core/iomgr/pollset_posix.c
@@ -624,9 +624,8 @@ static void basic_pollset_destroy(grpc_pollset *pollset) {
}
static const grpc_pollset_vtable basic_pollset = {
- basic_pollset_add_fd,
- basic_pollset_maybe_work_and_unlock, basic_pollset_destroy,
- basic_pollset_destroy};
+ basic_pollset_add_fd, basic_pollset_maybe_work_and_unlock,
+ basic_pollset_destroy, basic_pollset_destroy};
static void become_basic_pollset(grpc_pollset *pollset, grpc_fd *fd_or_null) {
pollset->vtable = &basic_pollset;
diff --git a/src/core/iomgr/tcp_windows.c b/src/core/iomgr/tcp_windows.c
index 6915cb2f49..cc7f7ff8d2 100644
--- a/src/core/iomgr/tcp_windows.c
+++ b/src/core/iomgr/tcp_windows.c
@@ -197,7 +197,8 @@ static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
tcp->read_slice = gpr_slice_malloc(8192);
- buffer.len = (ULONG)GPR_SLICE_LENGTH(tcp->read_slice); // we know slice size fits in 32bit.
+ buffer.len = (ULONG)GPR_SLICE_LENGTH(
+ tcp->read_slice); // we know slice size fits in 32bit.
buffer.buf = (char *)GPR_SLICE_START_PTR(tcp->read_slice);
TCP_REF(tcp, "read");
@@ -291,7 +292,7 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
for (i = 0; i < tcp->write_slices->count; i++) {
len = GPR_SLICE_LENGTH(tcp->write_slices->slices[i]);
GPR_ASSERT(len <= ULONG_MAX);
- buffers[i].len = (ULONG) len;
+ buffers[i].len = (ULONG)len;
buffers[i].buf = (char *)GPR_SLICE_START_PTR(tcp->write_slices->slices[i]);
}
diff --git a/src/core/json/json_reader.c b/src/core/json/json_reader.c
index 358e0f6c1d..256995240a 100644
--- a/src/core/json/json_reader.c
+++ b/src/core/json/json_reader.c
@@ -232,7 +232,7 @@ grpc_json_reader_status grpc_json_reader_run(grpc_json_reader *reader) {
reader->state = GRPC_JSON_STATE_END;
break;
default:
- GPR_UNREACHABLE_CODE(return GRPC_JSON_INTERNAL_ERROR);
+ GPR_UNREACHABLE_CODE(return GRPC_JSON_INTERNAL_ERROR);
}
}
break;
diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c
index 15cc8e6c0e..a0054741ad 100644
--- a/src/core/security/credentials.c
+++ b/src/core/security/credentials.c
@@ -512,8 +512,9 @@ grpc_call_credentials *grpc_service_account_jwt_access_credentials_create(
"token_lifetime="
"gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, "
"reserved=%p)",
- 5, (json_key, (long long)token_lifetime.tv_sec, (int)token_lifetime.tv_nsec,
- (int)token_lifetime.clock_type, reserved));
+ 5,
+ (json_key, (long long)token_lifetime.tv_sec, (int)token_lifetime.tv_nsec,
+ (int)token_lifetime.clock_type, reserved));
GPR_ASSERT(reserved == NULL);
return grpc_service_account_jwt_access_credentials_create_from_auth_json_key(
grpc_auth_json_key_create_from_string(json_key), token_lifetime);
diff --git a/src/core/support/time_posix.c b/src/core/support/time_posix.c
index 05d6cc0ca8..ba72572e05 100644
--- a/src/core/support/time_posix.c
+++ b/src/core/support/time_posix.c
@@ -47,7 +47,7 @@ static struct timespec timespec_from_gpr(gpr_timespec gts) {
struct timespec rv;
if (sizeof(time_t) < sizeof(gpr_int64)) {
/* fine to assert, as this is only used in gpr_sleep_until */
- GPR_ASSERT(gts.tv_sec <= INT32_MAX && gts.tv_sec >= INT32_MIN);
+ GPR_ASSERT(gts.tv_sec <= INT32_MAX && gts.tv_sec >= INT32_MIN);
}
rv.tv_sec = (time_t)gts.tv_sec;
rv.tv_nsec = gts.tv_nsec;
diff --git a/src/core/surface/call_log_batch.c b/src/core/surface/call_log_batch.c
index f4cd8375c2..46756f418b 100644
--- a/src/core/surface/call_log_batch.c
+++ b/src/core/surface/call_log_batch.c
@@ -116,4 +116,3 @@ void grpc_call_log_batch(char *file, int line, gpr_log_severity severity,
gpr_free(tmp);
}
}
-
diff --git a/src/core/surface/channel.c b/src/core/surface/channel.c
index a873c39441..d0a8b0be09 100644
--- a/src/core/surface/channel.c
+++ b/src/core/surface/channel.c
@@ -198,8 +198,8 @@ grpc_call *grpc_channel_create_call(grpc_channel *channel,
"deadline=gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, "
"reserved=%p)",
10, (channel, parent_call, (unsigned)propagation_mask, cq, method, host,
- (long long)deadline.tv_sec, (int)deadline.tv_nsec, (int)deadline.clock_type,
- reserved));
+ (long long)deadline.tv_sec, (int)deadline.tv_nsec,
+ (int)deadline.clock_type, reserved));
GPR_ASSERT(!reserved);
return grpc_channel_create_call_internal(
channel, parent_call, propagation_mask, cq,
@@ -242,8 +242,8 @@ grpc_call *grpc_channel_create_registered_call(
"deadline=gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, "
"reserved=%p)",
9, (channel, parent_call, (unsigned)propagation_mask, completion_queue,
- registered_call_handle, (long long)deadline.tv_sec, (int)deadline.tv_nsec,
- (int)deadline.clock_type, reserved));
+ registered_call_handle, (long long)deadline.tv_sec,
+ (int)deadline.tv_nsec, (int)deadline.clock_type, reserved));
GPR_ASSERT(!reserved);
return grpc_channel_create_call_internal(
channel, parent_call, propagation_mask, completion_queue,
diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c
index c71b9b02b0..7704a83e12 100644
--- a/src/core/surface/completion_queue.c
+++ b/src/core/surface/completion_queue.c
@@ -249,8 +249,8 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc,
"cc=%p, "
"deadline=gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, "
"reserved=%p)",
- 5, (cc, (long long)deadline.tv_sec, (int)deadline.tv_nsec, (int)deadline.clock_type,
- reserved));
+ 5, (cc, (long long)deadline.tv_sec, (int)deadline.tv_nsec,
+ (int)deadline.clock_type, reserved));
GPR_ASSERT(!reserved);
deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC);
diff --git a/src/core/surface/server_create.c b/src/core/surface/server_create.c
index e362bb4376..f30093e06b 100644
--- a/src/core/surface/server_create.c
+++ b/src/core/surface/server_create.c
@@ -47,6 +47,5 @@ grpc_server *grpc_server_create(const grpc_channel_args *args, void *reserved) {
filters[num_filters++] = &grpc_server_census_filter;
}
GRPC_API_TRACE("grpc_server_create(%p, %p)", 2, (args, reserved));
- return grpc_server_create_from_filters(filters, num_filters,
- args);
+ return grpc_server_create_from_filters(filters, num_filters, args);
}
diff --git a/src/core/transport/chttp2/frame_data.c b/src/core/transport/chttp2/frame_data.c
index 38fa990758..732124b7c9 100644
--- a/src/core/transport/chttp2/frame_data.c
+++ b/src/core/transport/chttp2/frame_data.c
@@ -118,7 +118,7 @@ void grpc_chttp2_encode_data(gpr_uint32 id, gpr_slice_buffer *inbuf,
hdr = gpr_slice_malloc(9);
p = GPR_SLICE_START_PTR(hdr);
- GPR_ASSERT(write_bytes < (1<<24));
+ GPR_ASSERT(write_bytes < (1 << 24));
*p++ = (gpr_uint8)(write_bytes >> 16);
*p++ = (gpr_uint8)(write_bytes >> 8);
*p++ = (gpr_uint8)(write_bytes);
diff --git a/src/core/transport/chttp2/frame_settings.c b/src/core/transport/chttp2/frame_settings.c
index f03fb45908..383b6e7f93 100644
--- a/src/core/transport/chttp2/frame_settings.c
+++ b/src/core/transport/chttp2/frame_settings.c
@@ -44,7 +44,7 @@
#include "src/core/transport/chttp2/http2_errors.h"
#include "src/core/transport/chttp2_transport.h"
-#define MAX_MAX_HEADER_LIST_SIZE (1024*1024*1024)
+#define MAX_MAX_HEADER_LIST_SIZE (1024 * 1024 * 1024)
/* HTTP/2 mandated initial connection settings */
const grpc_chttp2_setting_parameters
@@ -62,8 +62,9 @@ const grpc_chttp2_setting_parameters
GRPC_CHTTP2_FLOW_CONTROL_ERROR},
{"MAX_FRAME_SIZE", 16384, 16384, 16777215,
GRPC_CHTTP2_DISCONNECT_ON_INVALID_VALUE, GRPC_CHTTP2_PROTOCOL_ERROR},
- {"MAX_HEADER_LIST_SIZE", MAX_MAX_HEADER_LIST_SIZE, 0, MAX_MAX_HEADER_LIST_SIZE,
- GRPC_CHTTP2_CLAMP_INVALID_VALUE, GRPC_CHTTP2_PROTOCOL_ERROR},
+ {"MAX_HEADER_LIST_SIZE", MAX_MAX_HEADER_LIST_SIZE, 0,
+ MAX_MAX_HEADER_LIST_SIZE, GRPC_CHTTP2_CLAMP_INVALID_VALUE,
+ GRPC_CHTTP2_PROTOCOL_ERROR},
};
static gpr_uint8 *fill_header(gpr_uint8 *out, gpr_uint32 length,
diff --git a/src/core/transport/chttp2/hpack_encoder.c b/src/core/transport/chttp2/hpack_encoder.c
index 06f603db9c..6c558bc1cb 100644
--- a/src/core/transport/chttp2/hpack_encoder.c
+++ b/src/core/transport/chttp2/hpack_encoder.c
@@ -366,8 +366,9 @@ static void hpack_enc(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem,
if (GPR_SLICE_START_PTR(elem->key->slice)[0] != ':') { /* regular header */
st->seen_regular_header = 1;
} else {
- GPR_ASSERT(st->seen_regular_header == 0 &&
- "Reserved header (colon-prefixed) happening after regular ones.");
+ GPR_ASSERT(
+ st->seen_regular_header == 0 &&
+ "Reserved header (colon-prefixed) happening after regular ones.");
}
inc_filter(HASH_FRAGMENT_1(elem_hash), &c->filter_elems_sum, c->filter_elems);
diff --git a/src/core/transport/chttp2/varint.h b/src/core/transport/chttp2/varint.h
index 970d1e17e2..5acb15d032 100644
--- a/src/core/transport/chttp2/varint.h
+++ b/src/core/transport/chttp2/varint.h
@@ -66,7 +66,8 @@ void grpc_chttp2_hpack_write_varint_tail(gpr_uint32 tail_value,
if ((length) == 1u) { \
(tgt)[0] = (gpr_uint8)((prefix_or) | (n)); \
} else { \
- (tgt)[0] = (prefix_or) | (gpr_uint8)GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits); \
+ (tgt)[0] = \
+ (prefix_or) | (gpr_uint8)GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits); \
grpc_chttp2_hpack_write_varint_tail( \
(n)-GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits), (tgt) + 1, (length)-1); \
} \