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:
committed by
Ondřej Surý
parent
ea2fe8eea4
commit
bf44554889
@@ -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);
|
||||
/*%<
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user