Author: brane
Date: Sat Jul 5 05:35:41 2025
New Revision: 1926967
URL: http://svn.apache.org/viewvc?rev=1926967&view=rev
Log:
Remove an unused variable and document why we ignore a possible error.
* buckets/hpack_buckets.c
(handle_read_entry_and_clear): Remove the 'status' variable. Change the
type of 'own_key' and 'own_val' from 'char' to 'bool'; it makes
a strange kind of sense to use a semantically appropriate type.
Document why we can ignore the return value from hpack_table_get.
Modified:
serf/trunk/buckets/hpack_buckets.c
Modified: serf/trunk/buckets/hpack_buckets.c
URL:
http://svn.apache.org/viewvc/serf/trunk/buckets/hpack_buckets.c?rev=1926967&r1=1926966&r2=1926967&view=diff
==============================================================================
--- serf/trunk/buckets/hpack_buckets.c (original)
+++ serf/trunk/buckets/hpack_buckets.c Sat Jul 5 05:35:41 2025
@@ -1396,9 +1396,8 @@ handle_read_entry_and_clear(serf_hpack_d
serf_hpack_table_t *tbl = ctx->tbl;
const char *keep_key = NULL;
const char *keep_val = NULL;
- apr_status_t status;
- char own_key;
- char own_val;
+ bool own_key;
+ bool own_val;
serf__log(LOGLVL_INFO, SERF_LOGCOMP_PROTOCOL, __FILE__, ctx->config,
"Parsed from HPACK: %.*s: %.*s\n",
@@ -1476,9 +1475,11 @@ handle_read_entry_and_clear(serf_hpack_d
if (ctx->reuse_item)
{
- status = hpack_table_get(ctx->reuse_item, tbl,
- &keep_key, NULL,
- &keep_val, NULL);
+ /* hpack_table_get() does not modify its output arguments if
+ it returns an error, so we ignore the return value here. */
+ hpack_table_get(ctx->reuse_item, tbl,
+ &keep_key, NULL,
+ &keep_val, NULL);
}
own_key = (ctx->key && ctx->key != keep_key);