Commit 05b82f0e authored by Jan Včelák's avatar Jan Včelák 🚀

packet review: rename knot_pkt_put() parameter

parent dddd2457
......@@ -479,9 +479,9 @@ int knot_pkt_put_opt(knot_pkt_t *pkt)
return KNOT_EOK;
}
int knot_pkt_put(knot_pkt_t *pkt, uint16_t compress, const knot_rrset_t *rr, uint16_t flags)
int knot_pkt_put(knot_pkt_t *pkt, uint16_t compr_hint, const knot_rrset_t *rr, uint16_t flags)
{
dbg_packet("%s(%p, %u, %p, %u)\n", __func__, pkt, compress, rr, flags);
dbg_packet("%s(%p, %u, %p, %u)\n", __func__, pkt, compr_hint, rr, flags);
if (pkt == NULL || rr == NULL) {
return KNOT_EINVAL;
}
......@@ -490,7 +490,7 @@ int knot_pkt_put(knot_pkt_t *pkt, uint16_t compress, const knot_rrset_t *rr, uin
memset(rrinfo, 0, sizeof(knot_rrinfo_t));
rrinfo->pos = pkt->size;
rrinfo->flags = flags;
rrinfo->compress_ptr[0] = compress;
rrinfo->compress_ptr[0] = compr_hint;
pkt->rr[pkt->rrset_count] = rr;
/* Check for double insertion. */
......
......@@ -215,12 +215,12 @@ int knot_pkt_put_opt(knot_pkt_t *pkt);
* \note Available flags: PF_FREE, KNOT_PF_CHECKDUP, KNOT_PF_NOTRUNC
*
* \param pkt
* \param compress Compression hint, see enum knot_compr_hint or absolute position.
* \param compr_hint Compression hint, see enum knot_compr_hint or absolute position.
* \param rr Given RRSet.
* \param flags RRSet flags (set PF_FREE if you want RRSet to be freed with the packet).
* \return KNOT_EOK, KNOT_ESPACE, various errors
*/
int knot_pkt_put(knot_pkt_t *pkt, uint16_t compress, const knot_rrset_t *rr, uint16_t flags);
int knot_pkt_put(knot_pkt_t *pkt, uint16_t compr_hint, const knot_rrset_t *rr, uint16_t flags);
/*! \brief Get description of the given packet section. */
const knot_pktsection_t *knot_pkt_section(const knot_pkt_t *pkt, knot_section_t section_id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment