mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
code review changes.
This commit is contained in:
parent
8732b497cf
commit
a4ed9791ed
@ -15,9 +15,11 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: rt_21.c,v 1.15 2000/02/03 23:43:06 halley Exp $ */
|
/* $Id: rt_21.c,v 1.16 2000/03/16 23:51:09 brister Exp $ */
|
||||||
|
|
||||||
/* RFC 1183 */
|
/* reviewed: Thu Mar 16 15:02:31 PST 2000 by brister */
|
||||||
|
|
||||||
|
/* RFC 1183 */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_RT_21_C
|
#ifndef RDATA_GENERIC_RT_21_C
|
||||||
#define RDATA_GENERIC_RT_21_C
|
#define RDATA_GENERIC_RT_21_C
|
||||||
@ -33,7 +35,7 @@ fromtext_rt(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 21);
|
REQUIRE(type == 21);
|
||||||
|
|
||||||
rdclass = rdclass; /*unused*/
|
UNUSED(rdclass);
|
||||||
|
|
||||||
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
|
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
|
||||||
|
|
||||||
@ -72,7 +74,7 @@ totext_rt(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||||||
RETERR(str_totext(" ", target));
|
RETERR(str_totext(" ", target));
|
||||||
dns_name_fromregion(&name, ®ion);
|
dns_name_fromregion(&name, ®ion);
|
||||||
sub = name_prefix(&name, tctx->origin, &prefix);
|
sub = name_prefix(&name, tctx->origin, &prefix);
|
||||||
return(dns_name_totext(&prefix, sub, target));
|
return (dns_name_totext(&prefix, sub, target));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
@ -85,7 +87,7 @@ fromwire_rt(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||||||
isc_region_t tregion;
|
isc_region_t tregion;
|
||||||
|
|
||||||
REQUIRE(type == 21);
|
REQUIRE(type == 21);
|
||||||
rdclass = rdclass; /* unused */
|
UNUSED(rdclass);
|
||||||
|
|
||||||
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);
|
||||||
@ -107,7 +109,8 @@ fromwire_rt(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
towire_rt(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
|
towire_rt(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
|
||||||
|
{
|
||||||
dns_name_t name;
|
dns_name_t name;
|
||||||
isc_region_t region;
|
isc_region_t region;
|
||||||
isc_region_t tr;
|
isc_region_t tr;
|
||||||
@ -134,7 +137,8 @@ towire_rt(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
compare_rt(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
|
compare_rt(dns_rdata_t *rdata1, dns_rdata_t *rdata2)
|
||||||
|
{
|
||||||
dns_name_t name1;
|
dns_name_t name1;
|
||||||
dns_name_t name2;
|
dns_name_t name2;
|
||||||
isc_region_t region1;
|
isc_region_t region1;
|
||||||
@ -171,27 +175,28 @@ fromstruct_rt(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||||||
|
|
||||||
REQUIRE(type == 21);
|
REQUIRE(type == 21);
|
||||||
|
|
||||||
rdclass = rdclass; /*unused*/
|
UNUSED(rdclass);
|
||||||
|
UNUSED(source);
|
||||||
source = source;
|
UNUSED(target);
|
||||||
target = target;
|
|
||||||
|
|
||||||
return (DNS_R_NOTIMPLEMENTED);
|
return (DNS_R_NOTIMPLEMENTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
tostruct_rt(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
tostruct_rt(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
||||||
|
{
|
||||||
|
|
||||||
REQUIRE(rdata->type == 21);
|
REQUIRE(rdata->type == 21);
|
||||||
|
|
||||||
target = target;
|
UNUSED(target);
|
||||||
mctx = mctx;
|
UNUSED(mctx);
|
||||||
|
|
||||||
return (DNS_R_NOTIMPLEMENTED);
|
return (DNS_R_NOTIMPLEMENTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
freestruct_rt(void *source) {
|
freestruct_rt(void *source)
|
||||||
|
{
|
||||||
REQUIRE(source != NULL);
|
REQUIRE(source != NULL);
|
||||||
REQUIRE(ISC_FALSE); /*XXX*/
|
REQUIRE(ISC_FALSE); /*XXX*/
|
||||||
}
|
}
|
||||||
@ -221,7 +226,8 @@ additionaldata_rt(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
digest_rt(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
|
digest_rt(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg)
|
||||||
|
{
|
||||||
isc_region_t r1, r2;
|
isc_region_t r1, r2;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
dns_name_t name;
|
dns_name_t name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user