]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
remove the namebuf and onamebuf buffers in dig
authorEvan Hunt <each@isc.org>
Fri, 21 Feb 2025 08:33:35 +0000 (00:33 -0800)
committerEvan Hunt <each@isc.org>
Tue, 25 Feb 2025 20:53:25 +0000 (12:53 -0800)
lookup->namebuf and lookup->onamebuf were not necessary and
have been removed.

bin/dig/dighost.c
bin/dig/dighost.h

index cca1df70d24c81d46993b50db293ba2b9c052317..91aaa0f42efb802a2c9772d24fbe97c63fd8cc86 100644 (file)
@@ -2206,11 +2206,6 @@ setup_lookup(dig_lookup_t *lookup) {
        }
        dns_message_gettempname(lookup->sendmsg, &lookup->name);
 
-       isc_buffer_init(&lookup->namebuf, lookup->name_space,
-                       sizeof(lookup->name_space));
-       isc_buffer_init(&lookup->onamebuf, lookup->oname_space,
-                       sizeof(lookup->oname_space));
-
        /*
         * We cannot convert `textname' and `origin' separately.
         * `textname' doesn't contain TLD, but local mapping needs
@@ -2259,7 +2254,7 @@ setup_lookup(dig_lookup_t *lookup) {
                isc_buffer_init(&b, origin, len);
                isc_buffer_add(&b, len);
                result = dns_name_fromtext(lookup->oname, &b, dns_rootname, 0,
-                                          &lookup->onamebuf);
+                                          NULL);
                if (result != ISC_R_SUCCESS) {
                        dns_message_puttempname(lookup->sendmsg, &lookup->name);
                        dns_message_puttempname(lookup->sendmsg,
@@ -2282,7 +2277,7 @@ setup_lookup(dig_lookup_t *lookup) {
                                if (!dns_name_isabsolute(name)) {
                                        result = dns_name_concatenate(
                                                name, lookup->oname,
-                                               lookup->name, &lookup->namebuf);
+                                               lookup->name, NULL);
                                } else {
                                        dns_name_copy(name, lookup->name);
                                }
@@ -2310,8 +2305,7 @@ setup_lookup(dig_lookup_t *lookup) {
                        isc_buffer_init(&b, textname, len);
                        isc_buffer_add(&b, len);
                        result = dns_name_fromtext(lookup->name, &b,
-                                                  dns_rootname, 0,
-                                                  &lookup->namebuf);
+                                                  dns_rootname, 0, NULL);
                        if (result != ISC_R_SUCCESS) {
                                dns_message_puttempname(lookup->sendmsg,
                                                        &lookup->name);
index 1c5c7ddf9456821a1a39910236157baccd7735e9..8c404d115d3aa3968bf21a46d85bf597c09afc4f 100644 (file)
@@ -131,8 +131,6 @@ struct dig_lookup {
        bool rdclassset;
        char name_space[BUFSIZE];
        char oname_space[BUFSIZE];
-       isc_buffer_t namebuf;
-       isc_buffer_t onamebuf;
        isc_buffer_t renderbuf;
        char *sendspace;
        dns_name_t *name;