Small formatting and style changes

reviewable/pr16488/r8
Hope Casey-Allen 6 years ago
parent b731178a7c
commit 0b4e263fdf
  1. 4
      src/core/ext/transport/chttp2/transport/hpack_encoder.cc
  2. 1
      src/core/lib/transport/metadata_batch.cc
  3. 2
      src/core/lib/transport/static_metadata.cc
  4. 2
      src/core/lib/transport/static_metadata.h
  5. 4
      tools/codegen/core/gen_static_metadata.py

@ -690,7 +690,7 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor* c,
for (size_t i = 0; i < extra_headers_size; ++i) {
grpc_mdelem md = *extra_headers[i];
uint8_t static_index = GRPC_MDINDEX(md);
if (static_index > 0) {
if (static_index != GRPC_MDINDEX_UNUSED) {
emit_indexed(c, static_index, &st);
} else {
hpack_enc(c, md, &st);
@ -699,7 +699,7 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor* c,
grpc_metadata_batch_assert_ok(metadata);
for (grpc_linked_mdelem* l = metadata->list.head; l; l = l->next) {
uint8_t static_index = GRPC_MDINDEX(l->md);
if (static_index > 0) {
if (static_index != GRPC_MDINDEX_UNUSED) {
emit_indexed(c, static_index, &st);
} else {
hpack_enc(c, l->md, &st);

@ -109,7 +109,6 @@ static grpc_error* maybe_link_callout(grpc_metadata_batch* batch,
batch->idx.array[idx] = storage;
return GRPC_ERROR_NONE;
}
return grpc_attach_md_to_error(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Unallowed duplicate metadata"),
storage->md);

@ -24,7 +24,7 @@
* an explanation of what's going on.
*/
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/transport/static_metadata.h"

@ -27,7 +27,7 @@
#ifndef GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H
#define GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/transport/metadata.h"

@ -367,12 +367,12 @@ an explanation of what's going on.
print >> H, '#ifndef GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H'
print >> H, '#define GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H'
print >> H
print >> H, '#include <grpc/impl/codegen/port_platform.h>'
print >> H, '#include <grpc/support/port_platform.h>'
print >> H
print >> H, '#include "src/core/lib/transport/metadata.h"'
print >> H
print >> C, '#include <grpc/impl/codegen/port_platform.h>'
print >> C, '#include <grpc/support/port_platform.h>'
print >> C
print >> C, '#include "src/core/lib/transport/static_metadata.h"'
print >> C

Loading…
Cancel
Save