clang-format
diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h
index c2127a7..6ab0e17 100644
--- a/include/grpc++/impl/codegen/core_codegen.h
+++ b/include/grpc++/impl/codegen/core_codegen.h
@@ -82,7 +82,7 @@
void grpc_slice_unref(grpc_slice slice) GRPC_OVERRIDE;
grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) GRPC_OVERRIDE;
void grpc_slice_buffer_add(grpc_slice_buffer* sb,
- grpc_slice slice) GRPC_OVERRIDE;
+ grpc_slice slice) GRPC_OVERRIDE;
void grpc_slice_buffer_pop(grpc_slice_buffer* sb) GRPC_OVERRIDE;
void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE;
diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h
index 743f528..4783a43 100644
--- a/include/grpc++/impl/codegen/core_codegen_interface.h
+++ b/include/grpc++/impl/codegen/core_codegen_interface.h
@@ -96,7 +96,8 @@
virtual grpc_slice grpc_slice_malloc(size_t length) = 0;
virtual void grpc_slice_unref(grpc_slice slice) = 0;
virtual grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) = 0;
- virtual void grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice slice) = 0;
+ virtual void grpc_slice_buffer_add(grpc_slice_buffer* sb,
+ grpc_slice slice) = 0;
virtual void grpc_slice_buffer_pop(grpc_slice_buffer* sb) = 0;
virtual void grpc_metadata_array_init(grpc_metadata_array* array) = 0;
diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h
index 44876f5..f1de653 100644
--- a/include/grpc/slice_buffer.h
+++ b/include/grpc/slice_buffer.h
@@ -56,9 +56,9 @@
The implementation MAY decide to concatenate data at the end of a small
slice added in this fashion. */
GPRAPI size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer *sb,
- grpc_slice slice);
+ grpc_slice slice);
GPRAPI void grpc_slice_buffer_addn(grpc_slice_buffer *sb, grpc_slice *slices,
- size_t n);
+ size_t n);
/* add a very small (less than 8 bytes) amount of data to the end of a slice
buffer: returns a pointer into which to add the data */
GPRAPI uint8_t *grpc_slice_buffer_tiny_add(grpc_slice_buffer *sb, size_t len);
@@ -70,13 +70,13 @@
GPRAPI void grpc_slice_buffer_swap(grpc_slice_buffer *a, grpc_slice_buffer *b);
/* move all of the elements of src into dst */
GPRAPI void grpc_slice_buffer_move_into(grpc_slice_buffer *src,
- grpc_slice_buffer *dst);
+ grpc_slice_buffer *dst);
/* remove n bytes from the end of a slice buffer */
GPRAPI void grpc_slice_buffer_trim_end(grpc_slice_buffer *src, size_t n,
- grpc_slice_buffer *garbage);
+ grpc_slice_buffer *garbage);
/* move the first n bytes of src into dst */
GPRAPI void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n,
- grpc_slice_buffer *dst);
+ grpc_slice_buffer *dst);
/* take the first slice in the slice buffer */
GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *src);
diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c
index aa6d24e..5a283de 100644
--- a/src/core/ext/census/grpc_filter.c
+++ b/src/core/ext/census/grpc_filter.c
@@ -37,9 +37,9 @@
#include <string.h>
#include <grpc/census.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include <grpc/support/time.h>
#include "src/core/ext/census/census_interface.h"
diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c
index 6f1956a..8204289 100644
--- a/src/core/ext/client_channel/http_connect_handshaker.c
+++ b/src/core/ext/client_channel/http_connect_handshaker.c
@@ -35,9 +35,9 @@
#include <string.h>
+#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice_buffer.h>
#include <grpc/support/string_util.h>
#include "src/core/ext/client_channel/uri_parser.h"
@@ -136,11 +136,11 @@
grpc_slice_buffer_add(
&tmp_buffer,
grpc_slice_split_tail(&handshaker->read_buffer->slices[i],
- body_start_offset));
+ body_start_offset));
}
grpc_slice_buffer_addn(&tmp_buffer,
- &handshaker->read_buffer->slices[i + 1],
- handshaker->read_buffer->count - i - 1);
+ &handshaker->read_buffer->slices[i + 1],
+ handshaker->read_buffer->count - i - 1);
grpc_slice_buffer_swap(handshaker->read_buffer, &tmp_buffer);
grpc_slice_buffer_destroy(&tmp_buffer);
break;
diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h
index 5e00fd8..83a90be 100644
--- a/src/core/ext/transport/chttp2/transport/bin_decoder.h
+++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h
@@ -61,6 +61,6 @@
slice, does not take ownership of the input. Returns an empty slice if
decoding is failed. */
grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input,
- size_t output_length);
+ size_t output_length);
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */
diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.c b/src/core/ext/transport/chttp2/transport/bin_encoder.c
index 2baa1dc..af25a43 100644
--- a/src/core/ext/transport/chttp2/transport/bin_encoder.c
+++ b/src/core/ext/transport/chttp2/transport/bin_encoder.c
@@ -114,13 +114,15 @@
uint32_t temp_length = 0;
nbits = 0;
- for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); ++in) {
+ for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input);
+ ++in) {
nbits += grpc_chttp2_huffsyms[*in].length;
}
output = grpc_slice_malloc(nbits / 8 + (nbits % 8 != 0));
out = GRPC_SLICE_START_PTR(output);
- for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); ++in) {
+ for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input);
+ ++in) {
int sym = *in;
temp <<= grpc_chttp2_huffsyms[sym].length;
temp |= grpc_chttp2_huffsyms[sym].bits;
@@ -175,7 +177,8 @@
enc_flush_some(out);
}
-grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input) {
+grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(
+ grpc_slice input) {
size_t input_length = GRPC_SLICE_LENGTH(input);
size_t input_triplets = input_length / 3;
size_t tail_case = input_length % 3;
diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h
index 3d86a41..9e143b4 100644
--- a/src/core/ext/transport/chttp2/transport/bin_encoder.h
+++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h
@@ -49,6 +49,7 @@
grpc_slice y = grpc_chttp2_huffman_compress(x);
grpc_slice_unref(x);
return y; */
-grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input);
+grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(
+ grpc_slice input);
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */
diff --git a/src/core/ext/transport/chttp2/transport/frame.h b/src/core/ext/transport/chttp2/transport/frame.h
index 0b3842b..ffd4d96 100644
--- a/src/core/ext/transport/chttp2/transport/frame.h
+++ b/src/core/ext/transport/chttp2/transport/frame.h
@@ -34,8 +34,8 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H
#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H
-#include <grpc/support/port_platform.h>
#include <grpc/slice.h>
+#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/error.h"
diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h
index 927b7fb..21fe819 100644
--- a/src/core/ext/transport/chttp2/transport/frame_goaway.h
+++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h
@@ -34,9 +34,9 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H
#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H
-#include <grpc/support/port_platform.h>
#include <grpc/slice.h>
#include <grpc/slice_buffer.h>
+#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/frame.h"
#include "src/core/lib/iomgr/exec_ctx.h"
diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.c b/src/core/ext/transport/chttp2/transport/frame_ping.c
index 18ecb4d..7de5f63 100644
--- a/src/core/ext/transport/chttp2/transport/frame_ping.c
+++ b/src/core/ext/transport/chttp2/transport/frame_ping.c
@@ -94,7 +94,7 @@
grpc_chttp2_ack_ping(exec_ctx, t, p->opaque_8bytes);
} else {
grpc_slice_buffer_add(&t->qbuf,
- grpc_chttp2_ping_create(1, p->opaque_8bytes));
+ grpc_chttp2_ping_create(1, p->opaque_8bytes));
grpc_chttp2_initiate_write(exec_ctx, t, false, "ping response");
}
}
diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c
index 75e4101..b4c5ed7 100644
--- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c
+++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c
@@ -43,7 +43,7 @@
#include "src/core/ext/transport/chttp2/transport/status_conversion.h"
grpc_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code,
- grpc_transport_one_way_stats *stats) {
+ grpc_transport_one_way_stats *stats) {
static const size_t frame_size = 13;
grpc_slice slice = grpc_slice_malloc(frame_size);
stats->framing_bytes += frame_size;
diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
index f39002a..779507a 100644
--- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
+++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
@@ -45,7 +45,7 @@
} grpc_chttp2_rst_stream_parser;
grpc_slice grpc_chttp2_rst_stream_create(uint32_t stream_id, uint32_t code,
- grpc_transport_one_way_stats *stats);
+ grpc_transport_one_way_stats *stats);
grpc_error *grpc_chttp2_rst_stream_parser_begin_frame(
grpc_chttp2_rst_stream_parser *parser, uint32_t length, uint8_t flags);
diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c
index d3b2351..98facae 100644
--- a/src/core/ext/transport/chttp2/transport/frame_settings.c
+++ b/src/core/ext/transport/chttp2/transport/frame_settings.c
@@ -83,7 +83,7 @@
}
grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new,
- uint32_t force_mask, size_t count) {
+ uint32_t force_mask, size_t count) {
size_t i;
uint32_t n = 0;
grpc_slice output;
diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h
index bbbecec..a29dc82 100644
--- a/src/core/ext/transport/chttp2/transport/frame_settings.h
+++ b/src/core/ext/transport/chttp2/transport/frame_settings.h
@@ -34,8 +34,8 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H
#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H
-#include <grpc/support/port_platform.h>
#include <grpc/slice.h>
+#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/frame.h"
#include "src/core/lib/iomgr/exec_ctx.h"
@@ -88,7 +88,7 @@
/* Create a settings frame by diffing old & new, and updating old to be new */
grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new,
- uint32_t force_mask, size_t count);
+ uint32_t force_mask, size_t count);
/* Create an ack settings frame */
grpc_slice grpc_chttp2_settings_ack_create(void);
diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h
index b5f4033..f75dfb3 100644
--- a/src/core/ext/transport/chttp2/transport/frame_window_update.h
+++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h
@@ -45,8 +45,8 @@
uint32_t amount;
} grpc_chttp2_window_update_parser;
-grpc_slice grpc_chttp2_window_update_create(uint32_t id, uint32_t window_delta,
- grpc_transport_one_way_stats *stats);
+grpc_slice grpc_chttp2_window_update_create(
+ uint32_t id, uint32_t window_delta, grpc_transport_one_way_stats *stats);
grpc_error *grpc_chttp2_window_update_parser_begin_frame(
grpc_chttp2_window_update_parser *parser, uint32_t length, uint8_t flags);
diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c
index 3c5bcd3..eb68fe3 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c
+++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c
@@ -269,8 +269,9 @@
}
static grpc_slice get_wire_value(grpc_mdelem *elem, uint8_t *huffman_prefix) {
- if (grpc_is_binary_header((const char *)GRPC_SLICE_START_PTR(elem->key->slice),
- GRPC_SLICE_LENGTH(elem->key->slice))) {
+ if (grpc_is_binary_header(
+ (const char *)GRPC_SLICE_START_PTR(elem->key->slice),
+ GRPC_SLICE_LENGTH(elem->key->slice))) {
*huffman_prefix = 0x80;
return grpc_mdstr_as_base64_encoded_and_huffman_compressed(elem->value);
}
diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h
index 9188d9c..bcbd675 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h
+++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h
@@ -34,9 +34,9 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H
#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H
-#include <grpc/support/port_platform.h>
#include <grpc/slice.h>
#include <grpc/slice_buffer.h>
+#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/frame.h"
#include "src/core/lib/transport/metadata.h"
#include "src/core/lib/transport/metadata_batch.h"
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c
index 3c1c6ba..1046c31 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.c
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c
@@ -1501,9 +1501,9 @@
GRPC_ERROR_INT_INDEX, (intptr_t)p->index),
GRPC_ERROR_INT_SIZE, (intptr_t)p->table.num_ents);
}
- *is =
- grpc_is_binary_header((const char *)GRPC_SLICE_START_PTR(elem->key->slice),
- GRPC_SLICE_LENGTH(elem->key->slice));
+ *is = grpc_is_binary_header(
+ (const char *)GRPC_SLICE_START_PTR(elem->key->slice),
+ GRPC_SLICE_LENGTH(elem->key->slice));
return GRPC_ERROR_NONE;
}
diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h
index bc5a2d2..2ca130e 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_table.h
+++ b/src/core/ext/transport/chttp2/transport/hpack_table.h
@@ -34,8 +34,8 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H
#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H
-#include <grpc/support/port_platform.h>
#include <grpc/slice.h>
+#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/transport/metadata.h"
diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h
index 18fa2b4..b74233d 100644
--- a/src/core/ext/transport/chttp2/transport/internal.h
+++ b/src/core/ext/transport/chttp2/transport/internal.h
@@ -466,7 +466,8 @@
/** Process one slice of incoming data; return 1 if the connection is still
viable after reading, or 0 if the connection should be torn down */
grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx,
- grpc_chttp2_transport *t, grpc_slice slice);
+ grpc_chttp2_transport *t,
+ grpc_slice slice);
bool grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport *t,
grpc_chttp2_stream *s);
diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c
index cb88fd5..b9c4051 100644
--- a/src/core/ext/transport/chttp2/transport/parsing.c
+++ b/src/core/ext/transport/chttp2/transport/parsing.c
@@ -229,10 +229,10 @@
case GRPC_DTS_FRAME:
GPR_ASSERT(cur < end);
if ((uint32_t)(end - cur) == t->incoming_frame_size) {
- err = parse_frame_slice(exec_ctx, t,
- grpc_slice_sub_no_ref(slice, (size_t)(cur - beg),
- (size_t)(end - beg)),
- 1);
+ err = parse_frame_slice(
+ exec_ctx, t, grpc_slice_sub_no_ref(slice, (size_t)(cur - beg),
+ (size_t)(end - beg)),
+ 1);
if (err != GRPC_ERROR_NONE) {
return err;
}
@@ -244,7 +244,7 @@
err = parse_frame_slice(
exec_ctx, t,
grpc_slice_sub_no_ref(slice, cur_offset,
- cur_offset + t->incoming_frame_size),
+ cur_offset + t->incoming_frame_size),
1);
if (err != GRPC_ERROR_NONE) {
return err;
@@ -253,10 +253,10 @@
t->incoming_stream = NULL;
goto dts_fh_0; /* loop */
} else {
- err = parse_frame_slice(exec_ctx, t,
- grpc_slice_sub_no_ref(slice, (size_t)(cur - beg),
- (size_t)(end - beg)),
- 0);
+ err = parse_frame_slice(
+ exec_ctx, t, grpc_slice_sub_no_ref(slice, (size_t)(cur - beg),
+ (size_t)(end - beg)),
+ 0);
if (err != GRPC_ERROR_NONE) {
return err;
}
diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c
index 1486a7e..139e738 100644
--- a/src/core/ext/transport/chttp2/transport/writing.c
+++ b/src/core/ext/transport/chttp2/transport/writing.c
@@ -131,8 +131,8 @@
if (s->announce_window > 0) {
uint32_t announce = s->announce_window;
grpc_slice_buffer_add(&t->outbuf,
- grpc_chttp2_window_update_create(
- s->id, s->announce_window, &s->stats.outgoing));
+ grpc_chttp2_window_update_create(
+ s->id, s->announce_window, &s->stats.outgoing));
GRPC_CHTTP2_FLOW_DEBIT_STREAM("write", t, s, announce_window, announce);
}
if (sent_initial_metadata) {
@@ -163,8 +163,8 @@
s->sent_trailing_metadata = true;
if (!t->is_client && !s->read_closed) {
grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_rst_stream_create(
- s->id, GRPC_CHTTP2_NO_ERROR,
- &s->stats.outgoing));
+ s->id, GRPC_CHTTP2_NO_ERROR,
+ &s->stats.outgoing));
}
}
s->sending_bytes += send_bytes;
@@ -221,7 +221,7 @@
announced);
grpc_transport_one_way_stats throwaway_stats;
grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_window_update_create(
- 0, announced, &throwaway_stats));
+ 0, announced, &throwaway_stats));
}
GPR_TIMER_END("grpc_chttp2_begin_write", 0);
diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c
index 73fda07..1e5377c 100644
--- a/src/core/ext/transport/cronet/transport/cronet_transport.c
+++ b/src/core/ext/transport/cronet/transport/cronet_transport.c
@@ -34,10 +34,10 @@
#include <string.h>
#include <grpc/impl/codegen/port_platform.h>
+#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
-#include <grpc/slice_buffer.h>
#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
@@ -926,7 +926,7 @@
free_read_buffer(s);
grpc_slice_buffer_init(&stream_state->rs.read_slice_buffer);
grpc_slice_buffer_add(&stream_state->rs.read_slice_buffer,
- read_data_slice);
+ read_data_slice);
grpc_slice_buffer_stream_init(&stream_state->rs.sbs,
&stream_state->rs.read_slice_buffer, 0);
*((grpc_byte_buffer **)stream_op->recv_message) =
diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c
index c42a81b..de71bcc 100644
--- a/src/core/lib/channel/compress_filter.c
+++ b/src/core/lib/channel/compress_filter.c
@@ -35,9 +35,9 @@
#include <string.h>
#include <grpc/compression.h>
+#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice_buffer.h>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/compress_filter.h"
diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c
index 2ae86f5..0e62d58 100644
--- a/src/core/lib/channel/connected_channel.c
+++ b/src/core/lib/channel/connected_channel.c
@@ -38,9 +38,9 @@
#include <string.h>
#include <grpc/byte_buffer.h>
+#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice_buffer.h>
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/transport/transport.h"
diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c
index 00d3976..a45a399 100644
--- a/src/core/lib/channel/handshaker.c
+++ b/src/core/lib/channel/handshaker.c
@@ -146,8 +146,8 @@
static void call_next_handshaker(grpc_exec_ctx* exec_ctx,
grpc_endpoint* endpoint,
grpc_channel_args* args,
- grpc_slice_buffer* read_buffer, void* user_data,
- grpc_error* error) {
+ grpc_slice_buffer* read_buffer,
+ void* user_data, grpc_error* error) {
grpc_handshake_manager* mgr = user_data;
GPR_ASSERT(mgr->state != NULL);
GPR_ASSERT(mgr->state->index < mgr->count);
diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c
index 1a73a07..1063185 100644
--- a/src/core/lib/channel/http_server_filter.c
+++ b/src/core/lib/channel/http_server_filter.c
@@ -164,7 +164,7 @@
calld->seen_payload_bin = 1;
grpc_slice_buffer_init(&calld->read_slice_buffer);
grpc_slice_buffer_add(&calld->read_slice_buffer,
- grpc_slice_ref(md->value->slice));
+ grpc_slice_ref(md->value->slice));
grpc_slice_buffer_stream_init(&calld->read_stream,
&calld->read_slice_buffer, 0);
return NULL;
diff --git a/src/core/lib/http/format_request.c b/src/core/lib/http/format_request.c
index 59ff28f..024664b 100644
--- a/src/core/lib/http/format_request.c
+++ b/src/core/lib/http/format_request.c
@@ -37,8 +37,8 @@
#include <stdio.h>
#include <string.h>
-#include <grpc/support/alloc.h>
#include <grpc/slice.h>
+#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
#include "src/core/lib/support/string.h"
@@ -65,7 +65,8 @@
}
}
-grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) {
+grpc_slice grpc_httpcli_format_get_request(
+ const grpc_httpcli_request *request) {
gpr_strvec out;
char *flat;
size_t flat_len;
@@ -82,8 +83,8 @@
}
grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request,
- const char *body_bytes,
- size_t body_size) {
+ const char *body_bytes,
+ size_t body_size) {
gpr_strvec out;
char *tmp;
size_t out_len;
diff --git a/src/core/lib/http/format_request.h b/src/core/lib/http/format_request.h
index ad51701..1c8e3f6 100644
--- a/src/core/lib/http/format_request.h
+++ b/src/core/lib/http/format_request.h
@@ -39,8 +39,8 @@
grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request);
grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request,
- const char *body_bytes,
- size_t body_size);
+ const char *body_bytes,
+ size_t body_size);
grpc_slice grpc_httpcli_format_connect_request(
const grpc_httpcli_request *request);
diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h
index 6d003cd..a68011d 100644
--- a/src/core/lib/http/parser.h
+++ b/src/core/lib/http/parser.h
@@ -34,8 +34,8 @@
#ifndef GRPC_CORE_LIB_HTTP_PARSER_H
#define GRPC_CORE_LIB_HTTP_PARSER_H
-#include <grpc/support/port_platform.h>
#include <grpc/slice.h>
+#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/error.h"
/* Maximum length of a header string of the form 'Key: Value\r\n' */
diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c
index f047f45..6d7e549 100644
--- a/src/core/lib/iomgr/resource_quota.c
+++ b/src/core/lib/iomgr/resource_quota.c
@@ -300,7 +300,7 @@
}
static grpc_slice ru_slice_create(grpc_resource_user *resource_user,
- size_t size) {
+ size_t size) {
ru_slice_refcount *rc = gpr_malloc(sizeof(ru_slice_refcount) + size);
rc->base.ref = ru_slice_ref;
rc->base.unref = ru_slice_unref;
diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c
index 9f28c05..598c012 100644
--- a/src/core/lib/iomgr/tcp_client_windows.c
+++ b/src/core/lib/iomgr/tcp_client_windows.c
@@ -37,10 +37,10 @@
#include "src/core/lib/iomgr/sockaddr_windows.h"
+#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/log_windows.h>
-#include <grpc/slice_buffer.h>
#include <grpc/support/useful.h>
#include "src/core/lib/iomgr/iocp_windows.h"
diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c
index 9fe7662..bc1b91e 100644
--- a/src/core/lib/iomgr/tcp_windows.c
+++ b/src/core/lib/iomgr/tcp_windows.c
@@ -40,10 +40,10 @@
#include "src/core/lib/iomgr/network_status_tracker.h"
#include "src/core/lib/iomgr/sockaddr_windows.h"
+#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/log_windows.h>
-#include <grpc/slice_buffer.h>
#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c
index 07f16df..01e7fab 100644
--- a/src/core/lib/security/transport/handshake.c
+++ b/src/core/lib/security/transport/handshake.c
@@ -36,9 +36,9 @@
#include <stdbool.h>
#include <string.h>
+#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice_buffer.h>
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/security/context/security_context.h"
#include "src/core/lib/security/transport/secure_endpoint.h"
diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c
index 3d39cf5..f7e3264 100644
--- a/src/core/lib/security/transport/security_connector.c
+++ b/src/core/lib/security/transport/security_connector.c
@@ -36,10 +36,10 @@
#include <stdbool.h>
#include <string.h>
+#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
-#include <grpc/slice_buffer.h>
#include <grpc/support/string_util.h>
#include "src/core/ext/transport/chttp2/alpn/alpn.h"
diff --git a/src/core/lib/security/util/b64.c b/src/core/lib/security/util/b64.c
index 6270277..4892e8e 100644
--- a/src/core/lib/security/util/b64.c
+++ b/src/core/lib/security/util/b64.c
@@ -183,7 +183,7 @@
}
grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len,
- int url_safe) {
+ int url_safe) {
grpc_slice result = grpc_slice_malloc(b64_len);
unsigned char *current = GRPC_SLICE_START_PTR(result);
size_t result_size = 0;
diff --git a/src/core/lib/security/util/b64.h b/src/core/lib/security/util/b64.h
index f3218b9..6ea0b53 100644
--- a/src/core/lib/security/util/b64.h
+++ b/src/core/lib/security/util/b64.h
@@ -47,6 +47,6 @@
/* Same as above except that the length is provided by the caller. */
grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len,
- int url_safe);
+ int url_safe);
#endif /* GRPC_CORE_LIB_SECURITY_UTIL_B64_H */
diff --git a/src/core/lib/slice/slice.c b/src/core/lib/slice/slice.c
index 54ff6f6..3dac18d 100644
--- a/src/core/lib/slice/slice.c
+++ b/src/core/lib/slice/slice.c
@@ -31,9 +31,9 @@
*
*/
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include <string.h>
@@ -62,7 +62,7 @@
static void noop_ref_or_unref(void *unused) {}
static grpc_slice_refcount noop_refcount = {noop_ref_or_unref,
- noop_ref_or_unref};
+ noop_ref_or_unref};
grpc_slice grpc_slice_from_static_string(const char *s) {
grpc_slice slice;
@@ -95,8 +95,8 @@
}
grpc_slice grpc_slice_new_with_user_data(void *p, size_t len,
- void (*destroy)(void *),
- void *user_data) {
+ void (*destroy)(void *),
+ void *user_data) {
grpc_slice slice;
new_slice_refcount *rc = gpr_malloc(sizeof(new_slice_refcount));
gpr_ref_init(&rc->refs, 1);
@@ -140,7 +140,7 @@
}
grpc_slice grpc_slice_new_with_len(void *p, size_t len,
- void (*destroy)(void *, size_t)) {
+ void (*destroy)(void *, size_t)) {
grpc_slice slice;
new_with_len_slice_refcount *rc =
gpr_malloc(sizeof(new_with_len_slice_refcount));
diff --git a/src/core/lib/slice/slice_buffer.c b/src/core/lib/slice/slice_buffer.c
index 8416237..990ef12 100644
--- a/src/core/lib/slice/slice_buffer.c
+++ b/src/core/lib/slice/slice_buffer.c
@@ -31,8 +31,8 @@
*
*/
-#include <grpc/support/port_platform.h>
#include <grpc/slice_buffer.h>
+#include <grpc/support/port_platform.h>
#include <string.h>
@@ -112,7 +112,8 @@
writes */
if (!s.refcount && n) {
grpc_slice *back = &sb->slices[n - 1];
- if (!back->refcount && back->data.inlined.length < GRPC_SLICE_INLINED_SIZE) {
+ if (!back->refcount &&
+ back->data.inlined.length < GRPC_SLICE_INLINED_SIZE) {
if (s.data.inlined.length + back->data.inlined.length <=
GRPC_SLICE_INLINED_SIZE) {
memcpy(back->data.inlined.bytes + back->data.inlined.length,
@@ -193,7 +194,8 @@
}
}
-void grpc_slice_buffer_move_into(grpc_slice_buffer *src, grpc_slice_buffer *dst) {
+void grpc_slice_buffer_move_into(grpc_slice_buffer *src,
+ grpc_slice_buffer *dst) {
/* anything to move? */
if (src->count == 0) {
return;
@@ -210,7 +212,7 @@
}
void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n,
- grpc_slice_buffer *dst) {
+ grpc_slice_buffer *dst) {
size_t src_idx;
size_t output_len = dst->length + n;
size_t new_input_len = src->length - n;
@@ -248,7 +250,7 @@
}
void grpc_slice_buffer_trim_end(grpc_slice_buffer *sb, size_t n,
- grpc_slice_buffer *garbage) {
+ grpc_slice_buffer *garbage) {
GPR_ASSERT(n <= sb->length);
sb->length -= n;
for (;;) {
diff --git a/src/core/lib/surface/byte_buffer.c b/src/core/lib/surface/byte_buffer.c
index 5ae7e32..d646591 100644
--- a/src/core/lib/surface/byte_buffer.c
+++ b/src/core/lib/surface/byte_buffer.c
@@ -42,7 +42,8 @@
}
grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create(
- grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression) {
+ grpc_slice *slices, size_t nslices,
+ grpc_compression_algorithm compression) {
size_t i;
grpc_byte_buffer *bb = gpr_malloc(sizeof(grpc_byte_buffer));
bb->type = GRPC_BB_RAW;
diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c
index 6a1ef2b..0089959 100644
--- a/src/core/lib/surface/byte_buffer_reader.c
+++ b/src/core/lib/surface/byte_buffer_reader.c
@@ -37,9 +37,9 @@
#include <grpc/byte_buffer.h>
#include <grpc/compression.h>
#include <grpc/grpc.h>
+#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice_buffer.h>
#include "src/core/lib/compression/message_compress.h"
diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h
index 1b5525e..7a9ccb4 100644
--- a/src/core/lib/transport/metadata_batch.h
+++ b/src/core/lib/transport/metadata_batch.h
@@ -37,8 +37,8 @@
#include <stdbool.h>
#include <grpc/grpc.h>
-#include <grpc/support/port_platform.h>
#include <grpc/slice.h>
+#include <grpc/support/port_platform.h>
#include <grpc/support/time.h>
#include "src/core/lib/transport/metadata.h"
diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc
index e18f9f5..d4afb1f 100644
--- a/src/cpp/client/channel_cc.cc
+++ b/src/cpp/client/channel_cc.cc
@@ -47,8 +47,8 @@
#include <grpc++/support/status.h>
#include <grpc++/support/time.h>
#include <grpc/grpc.h>
-#include <grpc/support/log.h>
#include <grpc/slice.h>
+#include <grpc/support/log.h>
#include "src/core/lib/profiling/timers.h"
namespace grpc {
diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc
index fef8cc3..a07ad54 100644
--- a/src/cpp/common/core_codegen.cc
+++ b/src/cpp/common/core_codegen.cc
@@ -39,11 +39,11 @@
#include <grpc/byte_buffer.h>
#include <grpc/byte_buffer_reader.h>
#include <grpc/grpc.h>
+#include <grpc/slice.h>
+#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
-#include <grpc/slice.h>
-#include <grpc/slice_buffer.h>
#include <grpc/support/sync.h>
#include "src/core/lib/profiling/timers.h"
@@ -115,13 +115,16 @@
return ::grpc_slice_malloc(length);
}
-void CoreCodegen::grpc_slice_unref(grpc_slice slice) { ::grpc_slice_unref(slice); }
+void CoreCodegen::grpc_slice_unref(grpc_slice slice) {
+ ::grpc_slice_unref(slice);
+}
grpc_slice CoreCodegen::grpc_slice_split_tail(grpc_slice* s, size_t split) {
return ::grpc_slice_split_tail(s, split);
}
-void CoreCodegen::grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice slice) {
+void CoreCodegen::grpc_slice_buffer_add(grpc_slice_buffer* sb,
+ grpc_slice slice) {
::grpc_slice_buffer_add(sb, slice);
}
diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c
index 680850a..fc53cd9 100644
--- a/test/core/compression/message_compress_test.c
+++ b/test/core/compression/message_compress_test.c
@@ -70,8 +70,8 @@
GPR_INFO, "assert_passthrough: value_length=%" PRIuPTR
" value_hash=0x%08x "
"algorithm='%s' uncompressed_split='%s' compressed_split='%s'",
- GRPC_SLICE_LENGTH(value),
- gpr_murmur_hash3(GRPC_SLICE_START_PTR(value), GRPC_SLICE_LENGTH(value), 0),
+ GRPC_SLICE_LENGTH(value), gpr_murmur_hash3(GRPC_SLICE_START_PTR(value),
+ GRPC_SLICE_LENGTH(value), 0),
algorithm_name, grpc_slice_split_mode_name(uncompressed_split_mode),
grpc_slice_split_mode_name(compressed_split_mode));
@@ -221,7 +221,7 @@
grpc_slice_buffer_init(&input);
grpc_slice_buffer_init(&output);
grpc_slice_buffer_add(&input,
- grpc_slice_from_copied_buffer("\x78\xda\xff\xff", 4));
+ grpc_slice_from_copied_buffer("\x78\xda\xff\xff", 4));
/* try (and fail) to decompress the invalid compresed buffer */
GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output));
@@ -237,8 +237,8 @@
grpc_slice_buffer_init(&input);
grpc_slice_buffer_init(&output);
- grpc_slice_buffer_add(&input,
- grpc_slice_from_copied_string("Never gonna give you up"));
+ grpc_slice_buffer_add(
+ &input, grpc_slice_from_copied_string("Never gonna give you up"));
was_compressed =
grpc_msg_compress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output);
GPR_ASSERT(0 == was_compressed);
@@ -259,8 +259,8 @@
grpc_slice_buffer_init(&input);
grpc_slice_buffer_init(&output);
grpc_slice_buffer_add(&input,
- grpc_slice_from_copied_string(
- "I'm not really compressed but it doesn't matter"));
+ grpc_slice_from_copied_string(
+ "I'm not really compressed but it doesn't matter"));
was_decompressed =
grpc_msg_decompress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output);
GPR_ASSERT(0 == was_decompressed);
diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c
index 4fb89eb..5737397 100644
--- a/test/core/end2end/cq_verifier.c
+++ b/test/core/end2end/cq_verifier.c
@@ -119,7 +119,8 @@
cursor = GRPC_SLICE_START_PTR(out);
for (i = 0; i < nslices; i++) {
- memcpy(cursor, GRPC_SLICE_START_PTR(slices[i]), GRPC_SLICE_LENGTH(slices[i]));
+ memcpy(cursor, GRPC_SLICE_START_PTR(slices[i]),
+ GRPC_SLICE_LENGTH(slices[i]));
cursor += GRPC_SLICE_LENGTH(slices[i]);
}
diff --git a/test/core/end2end/invalid_call_argument_test.c b/test/core/end2end/invalid_call_argument_test.c
index 6cc7d28..765b6ad 100644
--- a/test/core/end2end/invalid_call_argument_test.c
+++ b/test/core/end2end/invalid_call_argument_test.c
@@ -251,7 +251,8 @@
gpr_log(GPR_INFO, "test_send_messages_at_the_same_time");
grpc_op *op;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
prepare_test(1);
diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c
index 317ca31..b0d1819 100644
--- a/test/core/end2end/tests/binary_metadata.c
+++ b/test/core/end2end/tests/binary_metadata.c
@@ -100,8 +100,10 @@
grpc_end2end_test_config config) {
grpc_call *c;
grpc_call *s;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
- grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
+ grpc_slice response_payload_slice =
+ grpc_slice_from_copied_string("hello you");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_byte_buffer *response_payload =
diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c
index 8f8b7d5..05a379c 100644
--- a/test/core/end2end/tests/call_creds.c
+++ b/test/core/end2end/tests/call_creds.c
@@ -135,8 +135,10 @@
override_mode mode) {
grpc_call *c;
grpc_call *s;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
- grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
+ grpc_slice response_payload_slice =
+ grpc_slice_from_copied_string("hello you");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_byte_buffer *response_payload =
@@ -389,7 +391,8 @@
char *details = NULL;
size_t details_capacity = 0;
grpc_byte_buffer *response_payload_recv = NULL;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_call_credentials *creds;
diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c
index 4bf55c8..f67da2d 100644
--- a/test/core/end2end/tests/cancel_after_accept.c
+++ b/test/core/end2end/tests/cancel_after_accept.c
@@ -118,8 +118,10 @@
size_t details_capacity = 0;
grpc_byte_buffer *request_payload_recv = NULL;
grpc_byte_buffer *response_payload_recv = NULL;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
- grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
+ grpc_slice response_payload_slice =
+ grpc_slice_from_copied_string("hello you");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_byte_buffer *response_payload =
diff --git a/test/core/end2end/tests/cancel_after_client_done.c b/test/core/end2end/tests/cancel_after_client_done.c
index afb17b0..44be854 100644
--- a/test/core/end2end/tests/cancel_after_client_done.c
+++ b/test/core/end2end/tests/cancel_after_client_done.c
@@ -117,8 +117,10 @@
size_t details_capacity = 0;
grpc_byte_buffer *request_payload_recv = NULL;
grpc_byte_buffer *response_payload_recv = NULL;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
- grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
+ grpc_slice response_payload_slice =
+ grpc_slice_from_copied_string("hello you");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_byte_buffer *response_payload =
diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c
index fe0e0d6..c276f5e 100644
--- a/test/core/end2end/tests/cancel_after_invoke.c
+++ b/test/core/end2end/tests/cancel_after_invoke.c
@@ -116,7 +116,8 @@
char *details = NULL;
size_t details_capacity = 0;
grpc_byte_buffer *response_payload_recv = NULL;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c
index 3a0b83c..e33b120 100644
--- a/test/core/end2end/tests/cancel_before_invoke.c
+++ b/test/core/end2end/tests/cancel_before_invoke.c
@@ -114,7 +114,8 @@
char *details = NULL;
size_t details_capacity = 0;
grpc_byte_buffer *response_payload_recv = NULL;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c
index 92788dd..4ed24ba 100644
--- a/test/core/end2end/tests/compressed_payload.c
+++ b/test/core/end2end/tests/compressed_payload.c
@@ -308,7 +308,8 @@
response_str[1023] = '\0';
request_payload_slice = grpc_slice_from_copied_string(request_str);
- grpc_slice response_payload_slice = grpc_slice_from_copied_string(response_str);
+ grpc_slice response_payload_slice =
+ grpc_slice_from_copied_string(response_str);
client_args = grpc_channel_args_set_compression_algorithm(
NULL, default_client_channel_compression_algorithm);
diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c
index 36f9869..b180957 100644
--- a/test/core/end2end/tests/filter_call_init_fails.c
+++ b/test/core/end2end/tests/filter_call_init_fails.c
@@ -108,7 +108,8 @@
static void test_request(grpc_end2end_test_config config) {
grpc_call *c;
grpc_call *s;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = five_seconds_time();
diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c
index 6644955..943a3df 100644
--- a/test/core/end2end/tests/filter_causes_close.c
+++ b/test/core/end2end/tests/filter_causes_close.c
@@ -104,7 +104,8 @@
static void test_request(grpc_end2end_test_config config) {
grpc_call *c;
grpc_call *s;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = five_seconds_time();
diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c
index 29dcafb..26a4eef 100644
--- a/test/core/end2end/tests/large_metadata.c
+++ b/test/core/end2end/tests/large_metadata.c
@@ -99,7 +99,8 @@
static void test_request_with_large_metadata(grpc_end2end_test_config config) {
grpc_call *c;
grpc_call *s;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = five_seconds_time();
diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c
index 1dba200..046e0c3 100644
--- a/test/core/end2end/tests/load_reporting_hook.c
+++ b/test/core/end2end/tests/load_reporting_hook.c
@@ -128,7 +128,8 @@
grpc_metadata *initial_lr_metadata,
grpc_metadata *trailing_lr_metadata) {
grpc_slice request_payload_slice = grpc_slice_from_static_string(request_msg);
- grpc_slice response_payload_slice = grpc_slice_from_static_string(response_msg);
+ grpc_slice response_payload_slice =
+ grpc_slice_from_static_string(response_msg);
grpc_call *c;
grpc_call *s;
grpc_byte_buffer *request_payload =
diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c
index cdf52f9..559b00d 100644
--- a/test/core/end2end/tests/max_message_length.c
+++ b/test/core/end2end/tests/max_message_length.c
@@ -116,7 +116,8 @@
cq_verifier *cqv;
grpc_op ops[6];
grpc_op *op;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_byte_buffer *recv_payload = NULL;
diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c
index e9528ff..84447e6 100644
--- a/test/core/end2end/tests/network_status_change.c
+++ b/test/core/end2end/tests/network_status_change.c
@@ -102,7 +102,8 @@
static void test_invoke_network_status_change(grpc_end2end_test_config config) {
grpc_call *c;
grpc_call *s;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = five_seconds_time();
diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c
index 5a19950..01ba964 100644
--- a/test/core/end2end/tests/payload.c
+++ b/test/core/end2end/tests/payload.c
@@ -95,7 +95,8 @@
grpc_completion_queue_destroy(f->cq);
}
-/* Creates and returns a grpc_slice containing random alphanumeric characters. */
+/* Creates and returns a grpc_slice containing random alphanumeric characters.
+ */
static grpc_slice generate_random_slice() {
size_t i;
static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890";
diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c
index 3398a9c..317788f 100644
--- a/test/core/end2end/tests/ping_pong_streaming.c
+++ b/test/core/end2end/tests/ping_pong_streaming.c
@@ -120,8 +120,10 @@
grpc_byte_buffer *response_payload;
grpc_byte_buffer *response_payload_recv;
int i;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
- grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
+ grpc_slice response_payload_slice =
+ grpc_slice_from_copied_string("hello you");
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr:1234", deadline,
diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c
index a37fc64..8649c15 100644
--- a/test/core/end2end/tests/request_with_flags.c
+++ b/test/core/end2end/tests/request_with_flags.c
@@ -100,7 +100,8 @@
grpc_end2end_test_config config, uint32_t *flags_for_op,
grpc_call_error call_start_batch_expected_result) {
grpc_call *c;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = five_seconds_time();
diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c
index 3e2bbb3..144cd58 100644
--- a/test/core/end2end/tests/request_with_payload.c
+++ b/test/core/end2end/tests/request_with_payload.c
@@ -99,7 +99,8 @@
static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
grpc_call *c;
grpc_call *s;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = five_seconds_time();
diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c
index 280bad5..cf81b06 100644
--- a/test/core/end2end/tests/resource_quota_server.c
+++ b/test/core/end2end/tests/resource_quota_server.c
@@ -95,7 +95,8 @@
grpc_completion_queue_destroy(f->cq);
}
-/* Creates and returns a grpc_slice containing random alphanumeric characters. */
+/* Creates and returns a grpc_slice containing random alphanumeric characters.
+ */
static grpc_slice generate_random_slice() {
size_t i;
static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890";
diff --git a/test/core/end2end/tests/simple_cacheable_request.c b/test/core/end2end/tests/simple_cacheable_request.c
index 40dd398..4284175 100644
--- a/test/core/end2end/tests/simple_cacheable_request.c
+++ b/test/core/end2end/tests/simple_cacheable_request.c
@@ -102,8 +102,10 @@
grpc_end2end_test_config config) {
grpc_call *c;
grpc_call *s;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
- grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
+ grpc_slice response_payload_slice =
+ grpc_slice_from_copied_string("hello you");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_byte_buffer *response_payload =
diff --git a/test/core/end2end/tests/simple_metadata.c b/test/core/end2end/tests/simple_metadata.c
index 1ac9dc8..e11981f 100644
--- a/test/core/end2end/tests/simple_metadata.c
+++ b/test/core/end2end/tests/simple_metadata.c
@@ -100,8 +100,10 @@
grpc_end2end_test_config config) {
grpc_call *c;
grpc_call *s;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
- grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
+ grpc_slice response_payload_slice =
+ grpc_slice_from_copied_string("hello you");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_byte_buffer *response_payload =
diff --git a/test/core/end2end/tests/trailing_metadata.c b/test/core/end2end/tests/trailing_metadata.c
index 0bbf087..f88d5ed 100644
--- a/test/core/end2end/tests/trailing_metadata.c
+++ b/test/core/end2end/tests/trailing_metadata.c
@@ -100,8 +100,10 @@
grpc_end2end_test_config config) {
grpc_call *c;
grpc_call *s;
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
- grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
+ grpc_slice response_payload_slice =
+ grpc_slice_from_copied_string("hello you");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_byte_buffer *response_payload =
diff --git a/test/core/http/format_request_test.c b/test/core/http/format_request_test.c
index bd31e5e..290990c 100644
--- a/test/core/http/format_request_test.c
+++ b/test/core/http/format_request_test.c
@@ -52,13 +52,13 @@
slice = grpc_httpcli_format_get_request(&req);
GPR_ASSERT(0 == grpc_slice_str_cmp(slice,
- "GET /index.html HTTP/1.0\r\n"
- "Host: example.com\r\n"
- "Connection: close\r\n"
- "User-Agent: " GRPC_HTTPCLI_USER_AGENT
- "\r\n"
- "x-yz: abc\r\n"
- "\r\n"));
+ "GET /index.html HTTP/1.0\r\n"
+ "Host: example.com\r\n"
+ "Connection: close\r\n"
+ "User-Agent: " GRPC_HTTPCLI_USER_AGENT
+ "\r\n"
+ "x-yz: abc\r\n"
+ "\r\n"));
grpc_slice_unref(slice);
}
@@ -79,16 +79,16 @@
slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len);
GPR_ASSERT(0 == grpc_slice_str_cmp(slice,
- "POST /index.html HTTP/1.0\r\n"
- "Host: example.com\r\n"
- "Connection: close\r\n"
- "User-Agent: " GRPC_HTTPCLI_USER_AGENT
- "\r\n"
- "x-yz: abc\r\n"
- "Content-Type: text/plain\r\n"
- "Content-Length: 9\r\n"
- "\r\n"
- "fake body"));
+ "POST /index.html HTTP/1.0\r\n"
+ "Host: example.com\r\n"
+ "Connection: close\r\n"
+ "User-Agent: " GRPC_HTTPCLI_USER_AGENT
+ "\r\n"
+ "x-yz: abc\r\n"
+ "Content-Type: text/plain\r\n"
+ "Content-Length: 9\r\n"
+ "\r\n"
+ "fake body"));
grpc_slice_unref(slice);
}
@@ -107,13 +107,13 @@
slice = grpc_httpcli_format_post_request(&req, NULL, 0);
GPR_ASSERT(0 == grpc_slice_str_cmp(slice,
- "POST /index.html HTTP/1.0\r\n"
- "Host: example.com\r\n"
- "Connection: close\r\n"
- "User-Agent: " GRPC_HTTPCLI_USER_AGENT
- "\r\n"
- "x-yz: abc\r\n"
- "\r\n"));
+ "POST /index.html HTTP/1.0\r\n"
+ "Host: example.com\r\n"
+ "Connection: close\r\n"
+ "User-Agent: " GRPC_HTTPCLI_USER_AGENT
+ "\r\n"
+ "x-yz: abc\r\n"
+ "\r\n"));
grpc_slice_unref(slice);
}
diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c
index 8a16996..8186ea7 100644
--- a/test/core/iomgr/endpoint_tests.c
+++ b/test/core/iomgr/endpoint_tests.c
@@ -36,9 +36,9 @@
#include <stdbool.h>
#include <sys/types.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include <grpc/support/time.h>
#include <grpc/support/useful.h>
#include "test/core/util/test_config.h"
@@ -88,7 +88,7 @@
static void end_test(grpc_endpoint_test_config config) { config.clean_up(); }
static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size,
- size_t *num_blocks, uint8_t *current_data) {
+ size_t *num_blocks, uint8_t *current_data) {
size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1 : 0);
grpc_slice *slices = gpr_malloc(sizeof(grpc_slice) * nslices);
size_t num_bytes_left = num_bytes;
@@ -99,7 +99,7 @@
for (i = 0; i < nslices; ++i) {
slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left
- : slice_size);
+ : slice_size);
num_bytes_left -= GRPC_SLICE_LENGTH(slices[i]);
buf = GRPC_SLICE_START_PTR(slices[i]);
for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) {
diff --git a/test/core/iomgr/load_file_test.c b/test/core/iomgr/load_file_test.c
index af82246..8714e1f 100644
--- a/test/core/iomgr/load_file_test.c
+++ b/test/core/iomgr/load_file_test.c
@@ -34,9 +34,9 @@
#include <stdio.h>
#include <string.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include "src/core/lib/iomgr/load_file.h"
#include "src/core/lib/support/string.h"
diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c
index bba1900..5eafa57 100644
--- a/test/core/iomgr/tcp_posix_test.c
+++ b/test/core/iomgr/tcp_posix_test.c
@@ -274,7 +274,7 @@
};
static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size,
- size_t *num_blocks, uint8_t *current_data) {
+ size_t *num_blocks, uint8_t *current_data) {
size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1u : 0u);
grpc_slice *slices = gpr_malloc(sizeof(grpc_slice) * nslices);
size_t num_bytes_left = num_bytes;
@@ -284,7 +284,7 @@
for (i = 0; i < nslices; ++i) {
slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left
- : slice_size);
+ : slice_size);
num_bytes_left -= GRPC_SLICE_LENGTH(slices[i]);
buf = GRPC_SLICE_START_PTR(slices[i]);
for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) {
diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c
index dea0f56..af883f5 100644
--- a/test/core/security/b64_test.c
+++ b/test/core/security/b64_test.c
@@ -35,9 +35,9 @@
#include <string.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include "test/core/util/test_config.h"
static int buffers_are_equal(const unsigned char *buf1,
diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c
index 0303b79..741ace9 100644
--- a/test/core/security/create_jwt.c
+++ b/test/core/security/create_jwt.c
@@ -37,10 +37,10 @@
#include "src/core/lib/iomgr/load_file.h"
#include "src/core/lib/security/credentials/jwt/jwt_credentials.h"
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/cmdline.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
void create_jwt(const char *json_key_file_path, const char *service_url,
const char *scope) {
diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c
index 0637215..d4c7550 100644
--- a/test/core/security/credentials_test.c
+++ b/test/core/security/credentials_test.c
@@ -243,9 +243,10 @@
GPR_ASSERT(token_lifetime.tv_sec == 3599);
GPR_ASSERT(token_lifetime.tv_nsec == 0);
GPR_ASSERT(token_md->num_entries == 1);
- GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].key, "authorization") == 0);
+ GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].key, "authorization") ==
+ 0);
GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].value,
- "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") ==
+ "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") ==
0);
grpc_credentials_md_store_unref(token_md);
grpc_http_response_destroy(&response);
@@ -530,7 +531,7 @@
GPR_ASSERT(num_md == 1);
GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].key, "authorization") == 0);
GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].value,
- "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") ==
+ "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") ==
0);
GPR_ASSERT(user_data != NULL);
GPR_ASSERT(strcmp((const char *)user_data, test_user_data) == 0);
diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c
index ca09309..e9e2112 100644
--- a/test/core/security/fetch_oauth2.c
+++ b/test/core/security/fetch_oauth2.c
@@ -36,10 +36,10 @@
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/cmdline.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include <grpc/support/sync.h>
#include "src/core/lib/iomgr/load_file.h"
diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c
index 593b798..2016558 100644
--- a/test/core/security/json_token_test.c
+++ b/test/core/security/json_token_test.c
@@ -37,9 +37,9 @@
#include <string.h>
#include <grpc/grpc_security.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include "src/core/lib/json/json.h"
#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c
index 01fe436..f8afba8 100644
--- a/test/core/security/jwt_verifier_test.c
+++ b/test/core/security/jwt_verifier_test.c
@@ -37,9 +37,9 @@
#include <grpc/grpc.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include <grpc/support/string_util.h>
#include "src/core/lib/http/httpcli.h"
@@ -487,8 +487,8 @@
GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig));
sig_bytes = GRPC_SLICE_START_PTR(sig);
(*sig_bytes)++; /* Corrupt first byte. */
- bad_b64_sig =
- grpc_base64_encode(GRPC_SLICE_START_PTR(sig), GRPC_SLICE_LENGTH(sig), 1, 0);
+ bad_b64_sig = grpc_base64_encode(GRPC_SLICE_START_PTR(sig),
+ GRPC_SLICE_LENGTH(sig), 1, 0);
memcpy(last_dot + 1, bad_b64_sig, strlen(bad_b64_sig));
gpr_free(bad_b64_sig);
grpc_slice_unref(sig);
diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c
index 22dbf04..44a2092 100644
--- a/test/core/security/oauth2_utils.c
+++ b/test/core/security/oauth2_utils.c
@@ -37,9 +37,9 @@
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include <grpc/support/sync.h>
#include "src/core/lib/security/credentials/credentials.h"
diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c
index 3a04c6e..157b7bf 100644
--- a/test/core/security/print_google_default_creds_token.c
+++ b/test/core/security/print_google_default_creds_token.c
@@ -36,10 +36,10 @@
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/cmdline.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include <grpc/support/sync.h>
#include "src/core/lib/security/credentials/composite/composite_credentials.h"
diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c
index 4d0ff24..043d29e 100644
--- a/test/core/security/verify_jwt.c
+++ b/test/core/security/verify_jwt.c
@@ -36,10 +36,10 @@
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/cmdline.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include <grpc/support/sync.h>
#include "src/core/lib/security/credentials/jwt/jwt_verifier.h"
diff --git a/test/core/slice/slice_buffer_test.c b/test/core/slice/slice_buffer_test.c
index 4c26113..bf9ae19 100644
--- a/test/core/slice/slice_buffer_test.c
+++ b/test/core/slice/slice_buffer_test.c
@@ -31,8 +31,8 @@
*
*/
-#include <grpc/support/log.h>
#include <grpc/slice_buffer.h>
+#include <grpc/support/log.h>
#include "test/core/util/test_config.h"
void test_slice_buffer_add() {
diff --git a/test/core/slice/slice_test.c b/test/core/slice/slice_test.c
index e6d29e7..ca44bec 100644
--- a/test/core/slice/slice_test.c
+++ b/test/core/slice/slice_test.c
@@ -170,11 +170,12 @@
grpc_slice_unref(slice);
}
-static void check_head_tail(grpc_slice slice, grpc_slice head, grpc_slice tail) {
+static void check_head_tail(grpc_slice slice, grpc_slice head,
+ grpc_slice tail) {
GPR_ASSERT(GRPC_SLICE_LENGTH(slice) ==
GRPC_SLICE_LENGTH(head) + GRPC_SLICE_LENGTH(tail));
- GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice), GRPC_SLICE_START_PTR(head),
- GRPC_SLICE_LENGTH(head)));
+ GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice),
+ GRPC_SLICE_START_PTR(head), GRPC_SLICE_LENGTH(head)));
GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(head),
GRPC_SLICE_START_PTR(tail), GRPC_SLICE_LENGTH(tail)));
}
@@ -243,8 +244,8 @@
slice = grpc_slice_from_copied_string(text);
GPR_ASSERT(strlen(text) == GRPC_SLICE_LENGTH(slice));
- GPR_ASSERT(0 ==
- memcmp(text, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice)));
+ GPR_ASSERT(
+ 0 == memcmp(text, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice)));
grpc_slice_unref(slice);
}
diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c
index c7e8f3a..e2813df 100644
--- a/test/core/transport/chttp2/hpack_parser_test.c
+++ b/test/core/transport/chttp2/hpack_parser_test.c
@@ -36,9 +36,9 @@
#include <stdarg.h>
#include <grpc/grpc.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/slice.h>
#include "test/core/util/parse_hexstring.h"
#include "test/core/util/slice_splitter.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/transport/chttp2/varint_test.c b/test/core/transport/chttp2/varint_test.c
index 5b831c7..e29be4b 100644
--- a/test/core/transport/chttp2/varint_test.c
+++ b/test/core/transport/chttp2/varint_test.c
@@ -33,15 +33,16 @@
#include "src/core/ext/transport/chttp2/transport/varint.h"
-#include <grpc/support/log.h>
#include <grpc/slice.h>
+#include <grpc/support/log.h>
#include "test/core/util/test_config.h"
static void test_varint(uint32_t value, uint32_t prefix_bits, uint8_t prefix_or,
const char *expect_bytes, size_t expect_length) {
uint32_t nbytes = GRPC_CHTTP2_VARINT_LENGTH(value, prefix_bits);
- grpc_slice expect = grpc_slice_from_copied_buffer(expect_bytes, expect_length);
+ grpc_slice expect =
+ grpc_slice_from_copied_buffer(expect_bytes, expect_length);
grpc_slice slice;
gpr_log(GPR_DEBUG, "Test: 0x%08x", value);
GPR_ASSERT(nbytes == expect_length);
diff --git a/test/core/util/mock_endpoint.h b/test/core/util/mock_endpoint.h
index 8f8d2a4..ec7f0fc 100644
--- a/test/core/util/mock_endpoint.h
+++ b/test/core/util/mock_endpoint.h
@@ -39,6 +39,7 @@
grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(grpc_slice slice),
grpc_resource_quota *resource_quota);
void grpc_mock_endpoint_put_read(grpc_exec_ctx *exec_ctx,
- grpc_endpoint *mock_endpoint, grpc_slice slice);
+ grpc_endpoint *mock_endpoint,
+ grpc_slice slice);
#endif
diff --git a/test/core/util/one_corpus_entry_fuzzer.c b/test/core/util/one_corpus_entry_fuzzer.c
index 6b572bb..c016ebb 100644
--- a/test/core/util/one_corpus_entry_fuzzer.c
+++ b/test/core/util/one_corpus_entry_fuzzer.c
@@ -47,7 +47,8 @@
leak_check = false;
GPR_ASSERT(
GRPC_LOG_IF_ERROR("load_file", grpc_load_file(argv[1], 0, &buffer)));
- LLVMFuzzerTestOneInput(GRPC_SLICE_START_PTR(buffer), GRPC_SLICE_LENGTH(buffer));
+ LLVMFuzzerTestOneInput(GRPC_SLICE_START_PTR(buffer),
+ GRPC_SLICE_LENGTH(buffer));
grpc_slice_unref(buffer);
return 0;
}
diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc
index a566675..f3cfe53 100644
--- a/test/cpp/grpclb/grpclb_test.cc
+++ b/test/cpp/grpclb/grpclb_test.cc
@@ -456,7 +456,8 @@
int i;
memset(ops, 0, sizeof(ops));
- grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world");
+ grpc_slice request_payload_slice =
+ grpc_slice_from_copied_string("hello world");
c = grpc_channel_create_call(cf->client, NULL, GRPC_PROPAGATE_DEFAULTS,
cf->cq, "/foo", "foo.test.google.fr:1234",
diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc
index 0517610..a02a8b2 100644
--- a/test/cpp/util/cli_call.cc
+++ b/test/cpp/util/cli_call.cc
@@ -41,8 +41,8 @@
#include <grpc++/generic/generic_stub.h>
#include <grpc++/support/byte_buffer.h>
#include <grpc/grpc.h>
-#include <grpc/support/log.h>
#include <grpc/slice.h>
+#include <grpc/support/log.h>
namespace grpc {
namespace testing {