Refactor ns_server_create() to return void

After isc_stats_create() change, the ns_server_create() cannot fail, so
refactor the function to return void and fix all its uses.
This commit is contained in:
Ondřej Surý
2023-06-26 11:09:26 +02:00
committed by Ondřej Surý
parent ea2fe8eea4
commit bf44554889
4 changed files with 4 additions and 7 deletions

View File

@@ -133,7 +133,7 @@ struct ns_altsecret {
unsigned char secret[32];
};
isc_result_t
void
ns_server_create(isc_mem_t *mctx, ns_matchview_t matchingview,
ns_server_t **sctxp);
/*%<

View File

@@ -35,7 +35,7 @@
RUNTIME_CHECK(result == ISC_R_SUCCESS); \
} while (0)
isc_result_t
void
ns_server_create(isc_mem_t *mctx, ns_matchview_t matchingview,
ns_server_t **sctxp) {
ns_server_t *sctx;
@@ -100,8 +100,6 @@ ns_server_create(isc_mem_t *mctx, ns_matchview_t matchingview,
sctx->magic = SCTX_MAGIC;
*sctxp = sctx;
return (ISC_R_SUCCESS);
}
void