mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Cleanup the isc_counter unit
The isc_counter_create() doesn't need the return value (it was always ISC_R_SUCCESS), use the macros to implement the reference counting, little style cleanup, and expand the unit test.
This commit is contained in:
@@ -939,10 +939,7 @@ startresolve(dns_client_t *client, const dns_name_t *name,
|
||||
rctx->magic = RCTX_MAGIC;
|
||||
isc_refcount_increment(&client->references);
|
||||
|
||||
result = isc_counter_create(mctx, client->max_queries, &rctx->qc);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
isc_counter_create(mctx, client->max_queries, &rctx->qc);
|
||||
|
||||
ISC_LIST_APPEND(client->resctxs, rctx, link);
|
||||
|
||||
|
Reference in New Issue
Block a user