Tagged as MEDIUM while it is only a code cleanup, but this function may
still be used by external code. It is an API change.
This function is no longer used but it is also useless. Indeed, thanks to
recent changes, it is not possible to have unused HTX blocks on head and
tail of the message. So, htx_is_unique_blk() can be replaced by a test on
the number of blocks in the message.
In addition, this function was almost always used to know if the EOM flag on
the message can be processed. Now, the info is on the block itself. So no
reason to still use this function. It should disappear naturally with
modifications to handle all recent changes.
So, let's remove it now.
return (blk ? htx_get_blk_type(blk) : HTX_BLK_UNUSED);
}
-/* Returns 1 if <blk> is the block is the only one inside the HTX message <htx>,
- * excluding all unused blocks. Otherwise, it returns 0. If 1 is returned, this
- * means that there is only <blk> and eventually some unused ones in <htx>.
- */
-static inline int htx_is_unique_blk(const struct htx *htx,
- const struct htx_blk *blk)
-{
- return (htx_get_blksz(blk) == htx->data);
-}
-
/* Changes the size of the value. It is the caller responsibility to change the
* value itself, make sure there is enough space and update allocated
* value. This function updates the HTX message accordingly.