diff --git a/bin/dig/host.c b/bin/dig/host.c index 9befd12e7e..7b6acade27 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -211,15 +211,9 @@ printsection(dns_message_t *msg, dns_section_t sectionid, isc_result_t result, loopresult; isc_region_t r; dns_name_t empty_name; - char tbuf[4096]; + char tbuf[4096] = { 0 }; bool first; - bool no_rdata; - - if (sectionid == DNS_SECTION_QUESTION) { - no_rdata = true; - } else { - no_rdata = false; - } + bool no_rdata = (sectionid == DNS_SECTION_QUESTION); if (headers) { printf(";; %s SECTION:\n", section_name);