From a4ed9791ed94e50ef92025d097d498b8a5bf55d7 Mon Sep 17 00:00:00 2001 From: James Brister Date: Thu, 16 Mar 2000 23:51:09 +0000 Subject: [PATCH] code review changes. --- lib/dns/rdata/generic/rt_21.c | 38 ++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/lib/dns/rdata/generic/rt_21.c b/lib/dns/rdata/generic/rt_21.c index 7a22a218d6..3c27526503 100644 --- a/lib/dns/rdata/generic/rt_21.c +++ b/lib/dns/rdata/generic/rt_21.c @@ -15,9 +15,11 @@ * 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 #define RDATA_GENERIC_RT_21_C @@ -33,7 +35,7 @@ fromtext_rt(dns_rdataclass_t rdclass, dns_rdatatype_t type, REQUIRE(type == 21); - rdclass = rdclass; /*unused*/ + UNUSED(rdclass); 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)); dns_name_fromregion(&name, ®ion); 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 @@ -85,7 +87,7 @@ fromwire_rt(dns_rdataclass_t rdclass, dns_rdatatype_t type, isc_region_t tregion; REQUIRE(type == 21); - rdclass = rdclass; /* unused */ + UNUSED(rdclass); if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx)) 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 -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; isc_region_t region; 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 -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 name2; isc_region_t region1; @@ -171,27 +175,28 @@ fromstruct_rt(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source, REQUIRE(type == 21); - rdclass = rdclass; /*unused*/ - - source = source; - target = target; + UNUSED(rdclass); + UNUSED(source); + UNUSED(target); return (DNS_R_NOTIMPLEMENTED); } 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); - target = target; - mctx = mctx; + UNUSED(target); + UNUSED(mctx); return (DNS_R_NOTIMPLEMENTED); } static inline void -freestruct_rt(void *source) { +freestruct_rt(void *source) +{ REQUIRE(source != NULL); REQUIRE(ISC_FALSE); /*XXX*/ } @@ -221,7 +226,8 @@ additionaldata_rt(dns_rdata_t *rdata, dns_additionaldatafunc_t add, } 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_result_t result; dns_name_t name;