resolved-dns-packet: Use hashmap_ensure_put

This commit is contained in:
Susant Sahani
2021-01-17 14:24:59 +01:00
parent 71fb97c7c4
commit 3004fcd0b8
+1 -5
View File
@@ -557,11 +557,7 @@ int dns_packet_append_name(
goto fail;
}
r = hashmap_ensure_allocated(&p->names, &dns_name_hash_ops);
if (r < 0)
goto fail;
r = hashmap_put(p->names, s, SIZE_TO_PTR(n));
r = hashmap_ensure_put(&p->names, &dns_name_hash_ops, s, SIZE_TO_PTR(n));
if (r < 0)
goto fail;