2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

code review

This commit is contained in:
Brian Wellington
2000-03-16 02:16:16 +00:00
parent 8cb85014a7
commit 5fe1a9797c

View File

@@ -15,7 +15,9 @@
* SOFTWARE. * SOFTWARE.
*/ */
/* $Id: ns_2.c,v 1.21 2000/02/03 23:43:03 halley Exp $ */ /* $Id: ns_2.c,v 1.22 2000/03/16 02:16:16 bwelling Exp $ */
/* Reviewed: Wed Mar 15 18:15:00 PST 2000 by bwelling */
#ifndef RDATA_GENERIC_NS_2_C #ifndef RDATA_GENERIC_NS_2_C
#define RDATA_GENERIC_NS_2_C #define RDATA_GENERIC_NS_2_C
@@ -29,10 +31,10 @@ fromtext_ns(dns_rdataclass_t rdclass, dns_rdatatype_t type,
dns_name_t name; dns_name_t name;
isc_buffer_t buffer; isc_buffer_t buffer;
REQUIRE(type == 2);
UNUSED(rdclass); UNUSED(rdclass);
REQUIRE(type == 2);
RETERR(gettoken(lexer, &token,isc_tokentype_string, ISC_FALSE)); RETERR(gettoken(lexer, &token,isc_tokentype_string, ISC_FALSE));
dns_name_init(&name, NULL); dns_name_init(&name, NULL);
@@ -71,15 +73,15 @@ fromwire_ns(dns_rdataclass_t rdclass, dns_rdatatype_t type,
{ {
dns_name_t name; dns_name_t name;
REQUIRE(type == 2);
UNUSED(rdclass); UNUSED(rdclass);
REQUIRE(type == 2);
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx)) if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL); dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
else else
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14); dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&name, NULL); dns_name_init(&name, NULL);
return (dns_name_fromwire(&name, source, dctx, downcase, target)); return (dns_name_fromwire(&name, source, dctx, downcase, target));
} }
@@ -130,14 +132,12 @@ static inline isc_result_t
fromstruct_ns(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source, fromstruct_ns(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
isc_buffer_t *target) isc_buffer_t *target)
{ {
UNUSED(rdclass);
UNUSED(source);
UNUSED(target);
REQUIRE(type == 2); REQUIRE(type == 2);
rdclass = rdclass; /*unused*/
source = source;
target = target;
return (DNS_R_NOTIMPLEMENTED); return (DNS_R_NOTIMPLEMENTED);
} }