From b402f83472fd55dcca2332145a2c255fc0be689b Mon Sep 17 00:00:00 2001 From: James Brister Date: Fri, 28 Jan 2000 23:48:06 +0000 Subject: [PATCH] Change to printing of tkey lists. --- lib/dns/config/confkeys.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/dns/config/confkeys.c b/lib/dns/config/confkeys.c index 43475c2ad8..fda67ad319 100644 --- a/lib/dns/config/confkeys.c +++ b/lib/dns/config/confkeys.c @@ -961,16 +961,17 @@ dns_c_tkeylist_print(FILE *fp, int indent, dns_c_tkeylist_t *list) REQUIRE(fp != NULL); REQUIRE(DNS_C_TKEYLIST_VALID(list)); - if (ISC_LIST_EMPTY(list->tkeylist)) { - return; - } - dns_c_printtabs(fp, indent); fprintf(fp, "trusted-keys {\n"); tkey = ISC_LIST_HEAD(list->tkeylist); - while (tkey != NULL) { - dns_c_tkey_print(fp, indent + 1, tkey); - tkey = ISC_LIST_NEXT(tkey, next); + if (tkey == NULL) { + dns_c_printtabs(fp, indent + 1); + fprintf(fp, "/* empty list */\n"); + } else { + while (tkey != NULL) { + dns_c_tkey_print(fp, indent + 1, tkey); + tkey = ISC_LIST_NEXT(tkey, next); + } } dns_c_printtabs(fp, indent); fprintf(fp,"};\n");