From: Evan Hunt Date: Fri, 21 Feb 2025 08:33:35 +0000 (-0800) Subject: remove the namebuf and onamebuf buffers in dig X-Git-Tag: ondrej/lock-free-qpzone-reads-v1~27^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d7a9ebedac6939937ca5baa477ad88392ef7a99;p=thirdparty%2Fbind9.git remove the namebuf and onamebuf buffers in dig lookup->namebuf and lookup->onamebuf were not necessary and have been removed. --- diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index cca1df70d24..91aaa0f42ef 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -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); diff --git a/bin/dig/dighost.h b/bin/dig/dighost.h index 1c5c7ddf945..8c404d115d3 100644 --- a/bin/dig/dighost.h +++ b/bin/dig/dighost.h @@ -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;