From 06453fb15ecb07b61c025a1781e8a25e98728547 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 22 Jul 2014 02:03:18 +0900 Subject: [PATCH] Remove unused role member in nghttp2_hd_context --- lib/nghttp2_hd.c | 8 +++----- lib/nghttp2_hd.h | 7 ------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/nghttp2_hd.c b/lib/nghttp2_hd.c index 95176b3b..d283a425 100644 --- a/lib/nghttp2_hd.c +++ b/lib/nghttp2_hd.c @@ -281,11 +281,9 @@ static void hd_ringbuf_pop_back(nghttp2_hd_ringbuf *ringbuf) --ringbuf->len; } -static int hd_context_init(nghttp2_hd_context *context, - nghttp2_hd_role role) +static int hd_context_init(nghttp2_hd_context *context) { int rv; - context->role = role; context->bad = 0; context->hd_table_bufsize_max = NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE; rv = hd_ringbuf_init @@ -314,7 +312,7 @@ int nghttp2_hd_deflate_init2(nghttp2_hd_deflater *deflater, size_t deflate_hd_table_bufsize_max) { int rv; - rv = hd_context_init(&deflater->ctx, NGHTTP2_HD_ROLE_DEFLATE); + rv = hd_context_init(&deflater->ctx); if(rv != 0) { return rv; } @@ -335,7 +333,7 @@ int nghttp2_hd_inflate_init(nghttp2_hd_inflater *inflater) { int rv; - rv = hd_context_init(&inflater->ctx, NGHTTP2_HD_ROLE_INFLATE); + rv = hd_context_init(&inflater->ctx); if(rv != 0) { goto fail; } diff --git a/lib/nghttp2_hd.h b/lib/nghttp2_hd.h index 2c16af05..aedaf922 100644 --- a/lib/nghttp2_hd.h +++ b/lib/nghttp2_hd.h @@ -50,11 +50,6 @@ /* Exported for unit test */ extern const size_t NGHTTP2_STATIC_TABLE_LENGTH; -typedef enum { - NGHTTP2_HD_ROLE_DEFLATE, - NGHTTP2_HD_ROLE_INFLATE -} nghttp2_hd_role; - typedef enum { NGHTTP2_HD_FLAG_NONE = 0, /* Indicates name was dynamically allocated and must be freed */ @@ -115,8 +110,6 @@ typedef struct { size_t hd_table_bufsize; /* The effective header table size. */ size_t hd_table_bufsize_max; - /* Role of this context; deflate or infalte */ - nghttp2_hd_role role; /* If inflate/deflate error occurred, this value is set to 1 and further invocation of inflate/deflate will fail with NGHTTP2_ERR_HEADER_COMP. */