Commit 96805adf authored by James Brister's avatar James Brister
Browse files

code review changes

parent ce8b84ce
......@@ -15,7 +15,9 @@
* SOFTWARE.
*/
/* $Id: mx_15.c,v 1.22 2000/02/03 23:43:03 halley Exp $ */
/* $Id: mx_15.c,v 1.23 2000/03/16 02:07:06 brister Exp $ */
/* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */
#ifndef RDATA_GENERIC_MX_15_C
#define RDATA_GENERIC_MX_15_C
......@@ -31,7 +33,7 @@ fromtext_mx(dns_rdataclass_t rdclass, dns_rdatatype_t type,
REQUIRE(type == 15);
rdclass = rdclass; /*unused*/
UNUSED(rdclass);
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
......@@ -70,7 +72,7 @@ totext_mx(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
RETERR(str_totext(" ", target));
dns_name_fromregion(&name, &region);
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
......@@ -84,7 +86,7 @@ fromwire_mx(dns_rdataclass_t rdclass, dns_rdatatype_t type,
REQUIRE(type == 15);
rdclass = rdclass; /* unused */
UNUSED(rdclass);
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
......@@ -106,7 +108,8 @@ fromwire_mx(dns_rdataclass_t rdclass, dns_rdatatype_t type,
}
static inline isc_result_t
towire_mx(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
towire_mx(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
{
dns_name_t name;
isc_region_t region;
isc_region_t tr;
......@@ -133,7 +136,8 @@ towire_mx(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
}
static inline int
compare_mx(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
compare_mx(dns_rdata_t *rdata1, dns_rdata_t *rdata2)
{
dns_name_t name1;
dns_name_t name2;
isc_region_t region1;
......@@ -167,30 +171,30 @@ static inline isc_result_t
fromstruct_mx(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
isc_buffer_t *target)
{
REQUIRE(type == 15);
rdclass = rdclass; /*unused*/
UNUSED(rdclass);
source = source;
target = target;
UNUSED(source);
UNUSED(target);
return (DNS_R_NOTIMPLEMENTED);
}
static inline isc_result_t
tostruct_mx(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
tostruct_mx(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
{
REQUIRE(rdata->type == 15);
target = target;
mctx = mctx;
UNUSED(target);
UNUSED(mctx);
return (DNS_R_NOTIMPLEMENTED);
}
static inline void
freestruct_mx(void *source) {
freestruct_mx(void *source)
{
REQUIRE(source != NULL);
REQUIRE(ISC_FALSE); /*XXX*/
}
......@@ -213,7 +217,8 @@ additionaldata_mx(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
}
static inline isc_result_t
digest_mx(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
digest_mx(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg)
{
isc_region_t r1, r2;
isc_result_t result;
dns_name_t name;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment