Instead of checking whether an element is present and then deleting it,
we can try to delete it optimistically and then rely on the result to
know if the element was present or not.
}
/* Does the entry exist in the old nodes table? */
- result = isc_ht_find(rpz->nodes, name->ndata, name->length,
- NULL);
+ result = isc_ht_delete(rpz->nodes, name->ndata, name->length);
if (result == ISC_R_SUCCESS) { /* found */
- isc_ht_delete(rpz->nodes, name->ndata, name->length);
goto next;
}