summaryrefslogtreecommitdiffstats
path: root/lib/dns/stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dns/stats.c')
-rw-r--r--lib/dns/stats.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/dns/stats.c b/lib/dns/stats.c
index 390a397..238efac 100644
--- a/lib/dns/stats.c
+++ b/lib/dns/stats.c
@@ -367,11 +367,12 @@ void
dns_dnssecsignstats_increment(dns_stats_t *stats, dns_keytag_t id, uint8_t alg,
dnssecsignstats_type_t operation) {
uint32_t kval;
- int num_keys = isc_stats_ncounters(stats->counters) /
- dnssecsign_block_size;
REQUIRE(DNS_STATS_VALID(stats) && stats->type == dns_statstype_dnssec);
+ int num_keys = isc_stats_ncounters(stats->counters) /
+ dnssecsign_block_size;
+
/* Shift algorithm in front of key tag, which is 16 bits */
kval = (uint32_t)(alg << 16 | id);
@@ -414,11 +415,12 @@ dns_dnssecsignstats_increment(dns_stats_t *stats, dns_keytag_t id, uint8_t alg,
void
dns_dnssecsignstats_clear(dns_stats_t *stats, dns_keytag_t id, uint8_t alg) {
uint32_t kval;
- int num_keys = isc_stats_ncounters(stats->counters) /
- dnssecsign_block_size;
REQUIRE(DNS_STATS_VALID(stats) && stats->type == dns_statstype_dnssec);
+ int num_keys = isc_stats_ncounters(stats->counters) /
+ dnssecsign_block_size;
+
/* Shift algorithm in front of key tag, which is 16 bits */
kval = (uint32_t)(alg << 16 | id);