mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
clean up uses of ISC_R_NOMEMORY
the isc_mem allocation functions can no longer fail; as a result, ISC_R_NOMEMORY is now rarely used: only when an external library such as libjson-c or libfstrm could return NULL. (even in these cases, arguably we should assert rather than returning ISC_R_NOMEMORY.) code and comments that mentioned ISC_R_NOMEMORY have been cleaned up, and the following functions have been changed to type void, since (in most cases) the only value they could return was ISC_R_SUCCESS: - dns_dns64_create() - dns_dyndb_create() - dns_ipkeylist_resize() - dns_kasp_create() - dns_kasp_key_create() - dns_keystore_create() - dns_order_create() - dns_order_add() - dns_peerlist_new() - dns_tkeyctx_create() - dns_view_create() - dns_zone_setorigin() - dns_zone_setfile() - dns_zone_setstream() - dns_zone_getdbtype() - dns_zone_setjournal() - dns_zone_setkeydirectory() - isc_lex_openstream() - isc_portset_create() - isc_symtab_create() (the exception is dns_view_create(), which could have returned other error codes in the event of a crypto library failure when calling isc_file_sanitize(), but that should be a RUNTIME_CHECK anyway.)
This commit is contained in:
@@ -3797,8 +3797,8 @@ create_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
|
||||
cfg_obj_t *obj = NULL;
|
||||
|
||||
CHECK(cfg_create_obj(pctx, type, &obj));
|
||||
CHECK(isc_symtab_create(pctx->mctx, 5, /* XXX */
|
||||
map_symtabitem_destroy, pctx, false, &symtab));
|
||||
isc_symtab_create(pctx->mctx, 5, /* XXX */
|
||||
map_symtabitem_destroy, pctx, false, &symtab);
|
||||
obj->value.map.symtab = symtab;
|
||||
obj->value.map.id = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user