Commit 90f073b5 authored by Daniel Salzman's avatar Daniel Salzman

libknot/rdataset: add knot_rdata_next function

parent 6536d71b
...@@ -51,6 +51,23 @@ inline static void knot_rdataset_init(knot_rdataset_t *rrs) ...@@ -51,6 +51,23 @@ inline static void knot_rdataset_init(knot_rdataset_t *rrs)
} }
} }
/*!
* \brief Advance to the next rdata in a rdataset.
*
* Useful for iteration.
*
* \note Ensure that this operation makes sense!
*
* \param rr Current RR.
*
* \return Next RR.
*/
static inline knot_rdata_t *knot_rdata_next(knot_rdata_t *rr)
{
assert(rr);
return (knot_rdata_t *)((uint8_t *)rr + knot_rdata_size(rr->len));
}
/*! /*!
* \brief Frees data initialized by RRS structure, but not the structure itself. * \brief Frees data initialized by RRS structure, but not the structure itself.
* *
......
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