From d12d5baf35775e47d4cb943b040243acec7a895a Mon Sep 17 00:00:00 2001
From: murgatroid99 <mlumish@google.com>
Date: Fri, 8 Jan 2016 13:26:23 -0800
Subject: [PATCH] Fixed a couple of remaining merge issues

---
 src/core/surface/validate_metadata.c |  6 ++---
 src/core/transport/metadata.c        | 37 ----------------------------
 2 files changed, 3 insertions(+), 40 deletions(-)

diff --git a/src/core/surface/validate_metadata.c b/src/core/surface/validate_metadata.c
index 7e88cc24d2..df2e80b4b7 100644
--- a/src/core/surface/validate_metadata.c
+++ b/src/core/surface/validate_metadata.c
@@ -36,7 +36,7 @@
 
 #include <grpc/support/port_platform.h>
 
-static int conforms_to(const char *s, size_t len, const gpr_uint8 *legal_bits) {
+static int conforms_to(const char *s, size_t len, const uint8_t *legal_bits) {
   const char *p = s;
   const char *e = s + len;
   for (; p != e; p++) {
@@ -49,7 +49,7 @@ static int conforms_to(const char *s, size_t len, const gpr_uint8 *legal_bits) {
 }
 
 int grpc_header_key_is_legal(const char *key, size_t length) {
-  static const gpr_uint8 legal_header_bits[256 / 8] = {
+  static const uint8_t legal_header_bits[256 / 8] = {
       0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xff, 0x03, 0x00, 0x00, 0x00,
       0x80, 0xfe, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
@@ -60,7 +60,7 @@ int grpc_header_key_is_legal(const char *key, size_t length) {
 }
 
 int grpc_header_nonbin_value_is_legal(const char *value, size_t length) {
-  static const gpr_uint8 legal_header_bits[256 / 8] = {
+  static const uint8_t legal_header_bits[256 / 8] = {
       0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
       0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/src/core/transport/metadata.c b/src/core/transport/metadata.c
index e241ad43bc..319e59603d 100644
--- a/src/core/transport/metadata.c
+++ b/src/core/transport/metadata.c
@@ -688,40 +688,3 @@ gpr_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *gs) {
   gpr_mu_unlock(&shard->mu);
   return slice;
 }
-<<<<<<< HEAD
-=======
-
-static int conforms_to(grpc_mdstr *s, const uint8_t *legal_bits) {
-  const uint8_t *p = GPR_SLICE_START_PTR(s->slice);
-  const uint8_t *e = GPR_SLICE_END_PTR(s->slice);
-  for (; p != e; p++) {
-    int idx = *p;
-    int byte = idx / 8;
-    int bit = idx % 8;
-    if ((legal_bits[byte] & (1 << bit)) == 0) return 0;
-  }
-  return 1;
-}
-
-int grpc_mdstr_is_legal_header(grpc_mdstr *s) {
-  static const uint8_t legal_header_bits[256 / 8] = {
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xff, 0x03, 0x00, 0x00, 0x00,
-      0x80, 0xfe, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-  return conforms_to(s, legal_header_bits);
-}
-
-int grpc_mdstr_is_legal_nonbin_header(grpc_mdstr *s) {
-  static const uint8_t legal_header_bits[256 / 8] = {
-      0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-      0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-  return conforms_to(s, legal_header_bits);
-}
-
-int grpc_mdstr_is_bin_suffixed(grpc_mdstr *s) {
-  /* TODO(ctiller): consider caching this */
-  return grpc_is_binary_header((const char *)GPR_SLICE_START_PTR(s->slice),
-                               GPR_SLICE_LENGTH(s->slice));
-}
->>>>>>> master
-- 
GitLab