Skip to content
Snippets Groups Projects
Commit b9e796d9 authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

cleanup: move assert to more proper place

parent f3edc3e2
No related branches found
No related tags found
1 merge request!253EDNS OPT writing
......@@ -313,8 +313,6 @@ static int answer_edns_put(knot_pkt_t *resp, struct query_data *qdata)
return KNOT_EOK;
}
assert(resp->current == KNOT_ADDITIONAL);
/* Reclaim reserved size. */
int ret = knot_pkt_reclaim(resp, knot_edns_wire_size(&qdata->opt_rr));
if (ret != KNOT_EOK) {
......@@ -322,6 +320,7 @@ static int answer_edns_put(knot_pkt_t *resp, struct query_data *qdata)
}
/* Write to packet. */
assert(resp->current == KNOT_ADDITIONAL);
return knot_pkt_put(resp, COMPR_HINT_NONE, &qdata->opt_rr, KNOT_PF_FREE);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment