basic/set: add set_ensure_consume()

This combines set_ensure_allocated() with set_consume(). The cool thing is that
because we know the hash ops, we can correctly free the item if appropriate.
Similarly to set_consume(), the goal is to simplify handling of the case where
the item needs to be freed on error and if already present in the set.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-06-24 10:38:15 +02:00
parent 6cd55d6f74
commit fcc1d0315d
4 changed files with 42 additions and 0 deletions
@@ -0,0 +1,2 @@
[Network]
DNSSECNegativeTrustAnchors=i i