diff options
Diffstat (limited to 'src/core/ext/transport/chttp2/transport/bin_encoder.cc')
-rw-r--r-- | src/core/ext/transport/chttp2/transport/bin_encoder.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.cc b/src/core/ext/transport/chttp2/transport/bin_encoder.cc index 42d481b3c0..09f984d7b2 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.cc +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.cc @@ -52,8 +52,8 @@ grpc_slice grpc_chttp2_base64_encode(grpc_slice input) { size_t tail_case = input_length % 3; size_t output_length = input_triplets * 4 + tail_xtra[tail_case]; grpc_slice output = GRPC_SLICE_MALLOC(output_length); - uint8_t *in = GRPC_SLICE_START_PTR(input); - char *out = (char *)GRPC_SLICE_START_PTR(output); + uint8_t* in = GRPC_SLICE_START_PTR(input); + char* out = (char*)GRPC_SLICE_START_PTR(output); size_t i; /* encode full triplets */ @@ -85,15 +85,15 @@ grpc_slice grpc_chttp2_base64_encode(grpc_slice input) { break; } - GPR_ASSERT(out == (char *)GRPC_SLICE_END_PTR(output)); + GPR_ASSERT(out == (char*)GRPC_SLICE_END_PTR(output)); GPR_ASSERT(in == GRPC_SLICE_END_PTR(input)); return output; } grpc_slice grpc_chttp2_huffman_compress(grpc_slice input) { size_t nbits; - uint8_t *in; - uint8_t *out; + uint8_t* in; + uint8_t* out; grpc_slice output; uint32_t temp = 0; uint32_t temp_length = 0; @@ -136,17 +136,17 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input) { typedef struct { uint32_t temp; uint32_t temp_length; - uint8_t *out; + uint8_t* out; } huff_out; -static void enc_flush_some(huff_out *out) { +static void enc_flush_some(huff_out* out) { while (out->temp_length > 8) { out->temp_length -= 8; *out->out++ = (uint8_t)(out->temp >> out->temp_length); } } -static void enc_add2(huff_out *out, uint8_t a, uint8_t b) { +static void enc_add2(huff_out* out, uint8_t a, uint8_t b) { b64_huff_sym sa = huff_alphabet[a]; b64_huff_sym sb = huff_alphabet[b]; out->temp = (out->temp << (sa.length + sb.length)) | @@ -155,7 +155,7 @@ static void enc_add2(huff_out *out, uint8_t a, uint8_t b) { enc_flush_some(out); } -static void enc_add1(huff_out *out, uint8_t a) { +static void enc_add1(huff_out* out, uint8_t a) { b64_huff_sym sa = huff_alphabet[a]; out->temp = (out->temp << sa.length) | sa.bits; out->temp_length += sa.length; @@ -170,8 +170,8 @@ grpc_slice grpc_chttp2_base64_encode_and_huffman_compress(grpc_slice input) { size_t max_output_bits = 11 * output_syms; size_t max_output_length = max_output_bits / 8 + (max_output_bits % 8 != 0); grpc_slice output = GRPC_SLICE_MALLOC(max_output_length); - uint8_t *in = GRPC_SLICE_START_PTR(input); - uint8_t *start_out = GRPC_SLICE_START_PTR(output); + uint8_t* in = GRPC_SLICE_START_PTR(input); + uint8_t* start_out = GRPC_SLICE_START_PTR(output); huff_out out; size_t i; |