From: Michał Kępień Date: Tue, 31 Dec 2024 04:40:48 +0000 (+0100) Subject: dns_message_logfmtpacket(): drop 'style' parameter X-Git-Tag: v9.21.4~9^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05d69bd7a44d3b28ad4a993f97656ad8de115178;p=thirdparty%2Fbind9.git dns_message_logfmtpacket(): drop 'style' parameter Both existing callers of the dns_message_logfmtpacket() function set the argument passed as 'style' to &dns_master_style_comment. To simplify these call sites, drop the 'style' parameter from the prototype for dns_message_logfmtpacket() and use a fixed value of &dns_master_style_comment in the function's body instead. --- diff --git a/lib/dns/include/dns/message.h b/lib/dns/include/dns/message.h index 0189bbf297a..67c9640d9a6 100644 --- a/lib/dns/include/dns/message.h +++ b/lib/dns/include/dns/message.h @@ -1404,8 +1404,7 @@ void dns_message_logfmtpacket(dns_message_t *message, const char *description, const isc_sockaddr_t *address, isc_logcategory_t category, isc_logmodule_t module, - const dns_master_style_t *style, int level, - isc_mem_t *mctx); + int level, isc_mem_t *mctx); /*%< * Log 'message' at the specified logging parameters. * @@ -1422,7 +1421,6 @@ dns_message_logfmtpacket(dns_message_t *message, const char *description, * \li address to be non NULL. * \li category to be valid. * \li module to be valid. - * \li style to be valid. * \li mctx to be a valid. */ diff --git a/lib/dns/message.c b/lib/dns/message.c index a5324eb10e9..e4631839fac 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -4741,12 +4741,11 @@ void dns_message_logfmtpacket(dns_message_t *message, const char *description, const isc_sockaddr_t *address, isc_logcategory_t category, isc_logmodule_t module, - const dns_master_style_t *style, int level, - isc_mem_t *mctx) { + int level, isc_mem_t *mctx) { REQUIRE(address != NULL); - logfmtpacket(message, description, address, category, module, style, - level, mctx); + logfmtpacket(message, description, address, category, module, + &dns_master_style_comment, level, mctx); } static void diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index f9a2a9708ea..0b0f87a1466 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -2712,7 +2712,7 @@ resquery_send(resquery_t *query) { dns_message_logfmtpacket( fctx->qmessage, "sending packet to", &query->addrinfo->sockaddr, DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_PACKETS, - &dns_master_style_comment, ISC_LOG_DEBUG(11), fctx->mctx); + ISC_LOG_DEBUG(11), fctx->mctx); /* * We're now done with the query message. @@ -9732,8 +9732,7 @@ rctx_logpacket(respctx_t *rctx) { dns_message_logfmtpacket( rctx->query->rmessage, "received packet from", &rctx->query->addrinfo->sockaddr, DNS_LOGCATEGORY_RESOLVER, - DNS_LOGMODULE_PACKETS, &dns_master_style_comment, - ISC_LOG_DEBUG(10), fctx->mctx); + DNS_LOGMODULE_PACKETS, ISC_LOG_DEBUG(10), fctx->mctx); #ifdef HAVE_DNSTAP /*