]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
dns_message_logfmtpacket(): drop 'style' parameter
authorMichał Kępień <michal@isc.org>
Tue, 31 Dec 2024 04:40:48 +0000 (05:40 +0100)
committerMichał Kępień <michal@isc.org>
Tue, 31 Dec 2024 04:40:48 +0000 (05:40 +0100)
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.

lib/dns/include/dns/message.h
lib/dns/message.c
lib/dns/resolver.c

index 0189bbf297ac04b149732c5b8e84781fcd7aa3d0..67c9640d9a6fb05308d0ee814879e407aca4b0eb 100644 (file)
@@ -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.
  */
 
index a5324eb10e9f27db13d234b4135cbe828051b138..e4631839fac9311f01560055aaa2abc1209a78a2 100644 (file)
@@ -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
index f9a2a9708eac8911d0b7dc263920698b21dfed8d..0b0f87a1466071727ee87087888df3e471a3afd3 100644 (file)
@@ -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
        /*