From: Matthijs Mekking Date: Thu, 7 Jan 2021 11:26:53 +0000 (+0100) Subject: Cleanup keymgr.c X-Git-Tag: v9.17.10~5^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=189d9a2d21b44eec25245cd5189c86d7115e79af;p=thirdparty%2Fbind9.git Cleanup keymgr.c Three small cleanups: 1. Remove an unused keystr/dst_key_format. 2. Initialize a dst_key_state_t state with NA. 3. Update false comment about local policy (local policy only adds barrier on transitions to the RUMOURED state, not the UNRETENTIVE state). --- diff --git a/lib/dns/keymgr.c b/lib/dns/keymgr.c index 076eb40e4b0..d7a5e279fdd 100644 --- a/lib/dns/keymgr.c +++ b/lib/dns/keymgr.c @@ -778,9 +778,6 @@ keymgr_ds_hidden_or_chained(dns_dnsseckeylist_t *keyring, dns_dnsseckey_t *key, for (dns_dnsseckey_t *dkey = ISC_LIST_HEAD(*keyring); dkey != NULL; dkey = ISC_LIST_NEXT(dkey, link)) { - char keystr[DST_KEY_FORMATSIZE]; - dst_key_format(dkey->key, keystr, sizeof(keystr)); - if (match_algorithms && (dst_key_alg(dkey->key) != dst_key_alg(key->key))) { continue; @@ -1082,7 +1079,7 @@ keymgr_policy_approval(dns_dnsseckeylist_t *keyring, dns_dnsseckey_t *key, if (next != RUMOURED) { /* * Local policy only adds an extra barrier on transitions to - * the RUMOURED and UNRETENTIVE states. + * the RUMOURED state. */ return (true); } @@ -2094,7 +2091,7 @@ keytime_status(dst_key_t *key, isc_stdtime_t now, isc_buffer_t *buf, char timestr[26]; /* Minimal buf as per ctime_r() spec. */ isc_result_t ret; isc_stdtime_t when = 0; - dst_key_state_t state; + dst_key_state_t state = NA; isc_buffer_printf(buf, "%s", pre); (void)dst_key_getstate(key, ks, &state);