mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
code review changes
This commit is contained in:
@@ -15,7 +15,9 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: cname_5.c,v 1.20 2000/02/03 23:42:58 halley Exp $ */
|
||||
/* $Id: cname_5.c,v 1.21 2000/03/16 01:15:36 brister Exp $ */
|
||||
|
||||
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
|
||||
|
||||
#ifndef RDATA_GENERIC_CNAME_5_C
|
||||
#define RDATA_GENERIC_CNAME_5_C
|
||||
@@ -31,7 +33,7 @@ fromtext_cname(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
||||
|
||||
REQUIRE(type == 5);
|
||||
|
||||
rdclass = rdclass; /*unused*/
|
||||
UNUSED(rdclass);
|
||||
|
||||
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
|
||||
|
||||
@@ -39,7 +41,7 @@ fromtext_cname(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
||||
buffer_fromregion(&buffer, &token.value.as_region,
|
||||
ISC_BUFFERTYPE_TEXT);
|
||||
origin = (origin != NULL) ? origin : dns_rootname;
|
||||
return (dns_name_fromtext(&name, &buffer, origin, downcase, target));
|
||||
return(dns_name_fromtext(&name, &buffer, origin, downcase, target));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
@@ -61,7 +63,7 @@ totext_cname(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
||||
|
||||
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
|
||||
@@ -73,7 +75,7 @@ fromwire_cname(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
||||
|
||||
REQUIRE(type == 5);
|
||||
|
||||
rdclass = rdclass; /*unused*/
|
||||
UNUSED(rdclass);
|
||||
|
||||
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||
@@ -85,7 +87,8 @@ fromwire_cname(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
towire_cname(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
|
||||
towire_cname(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
|
||||
{
|
||||
dns_name_t name;
|
||||
isc_region_t region;
|
||||
|
||||
@@ -100,11 +103,12 @@ towire_cname(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
|
||||
dns_rdata_toregion(rdata, ®ion);
|
||||
dns_name_fromregion(&name, ®ion);
|
||||
|
||||
return (dns_name_towire(&name, cctx, target));
|
||||
return(dns_name_towire(&name, cctx, target));
|
||||
}
|
||||
|
||||
static inline int
|
||||
compare_cname(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
|
||||
compare_cname(dns_rdata_t *rdata1, dns_rdata_t *rdata2)
|
||||
{
|
||||
dns_name_t name1;
|
||||
dns_name_t name2;
|
||||
isc_region_t region1;
|
||||
@@ -123,7 +127,7 @@ compare_cname(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
|
||||
dns_name_fromregion(&name1, ®ion1);
|
||||
dns_name_fromregion(&name2, ®ion2);
|
||||
|
||||
return (dns_name_rdatacompare(&name1, &name2));
|
||||
return(dns_name_rdatacompare(&name1, &name2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
@@ -133,28 +137,30 @@ fromstruct_cname(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
||||
|
||||
REQUIRE(type == 5);
|
||||
|
||||
rdclass = rdclass; /*unused*/
|
||||
UNUSED(rdclass);
|
||||
|
||||
source = source;
|
||||
target = target;
|
||||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return(DNS_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
tostruct_cname(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
||||
tostruct_cname(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
||||
{
|
||||
|
||||
REQUIRE(rdata->type == 5);
|
||||
REQUIRE(target != NULL);
|
||||
|
||||
target = target;
|
||||
mctx = mctx;
|
||||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return(DNS_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
freestruct_cname(void *source) {
|
||||
freestruct_cname(void *source)
|
||||
{
|
||||
REQUIRE(source != NULL);
|
||||
REQUIRE(ISC_FALSE);
|
||||
}
|
||||
@@ -168,11 +174,12 @@ additionaldata_cname(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
||||
(void)add;
|
||||
(void)arg;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return(DNS_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
digest_cname(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
|
||||
digest_cname(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg)
|
||||
{
|
||||
isc_region_t r;
|
||||
dns_name_t name;
|
||||
|
||||
@@ -182,7 +189,7 @@ digest_cname(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
|
||||
dns_name_init(&name, NULL);
|
||||
dns_name_fromregion(&name, &r);
|
||||
|
||||
return (dns_name_digest(&name, digest, arg));
|
||||
return(dns_name_digest(&name, digest, arg));
|
||||
}
|
||||
|
||||
#endif /* RDATA_GENERIC_CNAME_5_C */
|
||||
|
Reference in New Issue
Block a user