mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Make isc_result a static enum
Remove the dynamic registration of result codes. Convert isc_result_t from unsigned + #defines into 32-bit enum type in grand unified <isc/result.h> header. Keep the existing values of the result codes even at the expense of the description and identifier tables being unnecessary large. Additionally, add couple of: switch (result) { [...] default: break; } statements where compiler now complains about missing enum values in the switch statement.
This commit is contained in:
@@ -47,6 +47,8 @@
|
||||
|
||||
#define DST_KEY_INTERNAL
|
||||
|
||||
#include <isc/result.h>
|
||||
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/keyvalues.h>
|
||||
#include <dns/name.h>
|
||||
@@ -55,8 +57,6 @@
|
||||
#include <dns/ttl.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "dst_internal.h"
|
||||
|
||||
#define DST_AS_STR(t) ((t).value.as_textregion.base)
|
||||
@@ -190,8 +190,6 @@ dst_lib_init(isc_mem_t *mctx, const char *engine) {
|
||||
|
||||
UNUSED(engine);
|
||||
|
||||
dst_result_register();
|
||||
|
||||
memset(dst_t_func, 0, sizeof(dst_t_func));
|
||||
RETERR(dst__hmacmd5_init(&dst_t_func[DST_ALG_HMACMD5]));
|
||||
RETERR(dst__hmacsha1_init(&dst_t_func[DST_ALG_HMACSHA1]));
|
||||
|
Reference in New Issue
Block a user