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

packet review: use offset of when resetting the packet

parent b481d6a0
......@@ -135,7 +135,7 @@ static int knot_pkt_reset(knot_pkt_t *pkt, void *wire, uint16_t len)
/* NULL everything up to 'sections' (not the large data fields). */
int ret = KNOT_EOK;
mm_ctx_t mm = pkt->mm;
memset(pkt, 0, (size_t)&((knot_pkt_t*)NULL)->rr_info);
memset(pkt, 0, offsetof(knot_pkt_t, rr_info));
pkt->mm = mm;
/* Initialize OPT RR defaults. */
......
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