mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
simplify
This commit is contained in:
@@ -1411,7 +1411,6 @@ dns_dnssec_findmatchingkeys2(dns_name_t *origin, const char *directory,
|
|||||||
isc_stdtime_t now, isc_mem_t *mctx,
|
isc_stdtime_t now, isc_mem_t *mctx,
|
||||||
dns_dnsseckeylist_t *keylist)
|
dns_dnsseckeylist_t *keylist)
|
||||||
{
|
{
|
||||||
const char *digits = "0123456789";
|
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
isc_boolean_t dir_open = ISC_FALSE;
|
isc_boolean_t dir_open = ISC_FALSE;
|
||||||
dns_dnsseckeylist_t list;
|
dns_dnsseckeylist_t list;
|
||||||
@@ -1445,11 +1444,10 @@ dns_dnssec_findmatchingkeys2(dns_name_t *origin, const char *directory,
|
|||||||
|
|
||||||
alg = 0;
|
alg = 0;
|
||||||
for (i = len + 1 + 1; i < dir.entry.length ; i++) {
|
for (i = len + 1 + 1; i < dir.entry.length ; i++) {
|
||||||
const char *digit = strchr(digits, dir.entry.name[i]);
|
if (dir.entry.name[i] < '0' || dir.entry.name[i] > '9')
|
||||||
if (digit == NULL)
|
|
||||||
break;
|
break;
|
||||||
alg *= 10;
|
alg *= 10;
|
||||||
alg += (int)(digit - digits);
|
alg += dir.entry.name[i] - '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user