From c363150ad598e7a8ce03efe2776b8e6950f0de7b Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Thu, 16 Mar 2000 02:08:51 +0000 Subject: [PATCH] more code review --- lib/dns/rdata/generic/isdn_20.c | 32 ++++++++++++++++---------------- lib/dns/rdata/generic/mb_7.c | 20 ++++++++++---------- lib/dns/rdata/generic/md_3.c | 16 ++++++++-------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/lib/dns/rdata/generic/isdn_20.c b/lib/dns/rdata/generic/isdn_20.c index 88a3c1da70..dc367085c8 100644 --- a/lib/dns/rdata/generic/isdn_20.c +++ b/lib/dns/rdata/generic/isdn_20.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: isdn_20.c,v 1.13 2000/03/16 00:54:24 bwelling Exp $ */ +/* $Id: isdn_20.c,v 1.14 2000/03/16 02:08:49 bwelling Exp $ */ /* Reviewed: Wed Mar 15 16:53:11 PST 2000 by bwelling */ @@ -31,9 +31,9 @@ fromtext_isdn(dns_rdataclass_t rdclass, dns_rdatatype_t type, { isc_token_t token; - rdclass = rdclass; /*unused*/ - origin = origin; /*unused*/ - downcase = downcase; /*unused*/ + UNUSED(rdclass); + UNUSED(origin); + UNUSED(downcase); REQUIRE(type == 20); @@ -57,7 +57,7 @@ totext_isdn(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx, { isc_region_t region; - tctx = tctx; /*unused*/ + UNUSED(tctx); REQUIRE(rdata->type == 20); @@ -74,9 +74,9 @@ fromwire_isdn(dns_rdataclass_t rdclass, dns_rdatatype_t type, isc_buffer_t *source, dns_decompress_t *dctx, isc_boolean_t downcase, isc_buffer_t *target) { - dctx = dctx; /* unused */ - rdclass = rdclass; /* unused */ - downcase = downcase; /* unused */ + UNUSED(dctx); + UNUSED(rdclass); + UNUSED(downcase); REQUIRE(type == 20); @@ -88,7 +88,7 @@ fromwire_isdn(dns_rdataclass_t rdclass, dns_rdatatype_t type, static inline isc_result_t towire_isdn(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) { - cctx = cctx; /*unused*/ + UNUSED(cctx); REQUIRE(rdata->type == 20); @@ -113,9 +113,9 @@ static inline isc_result_t fromstruct_isdn(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source, isc_buffer_t *target) { - rdclass = rdclass; /*unused*/ - source = source; /*unused*/ - target = target; /*unused*/ + UNUSED(rdclass); + UNUSED(source); + UNUSED(target); REQUIRE(type == 20); @@ -124,8 +124,8 @@ fromstruct_isdn(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source, static inline isc_result_t tostruct_isdn(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) { - target = target; /*unused*/ - mctx = mctx; /*unused*/ + UNUSED(target); + UNUSED(mctx); REQUIRE(rdata->type == 20); @@ -142,8 +142,8 @@ static inline isc_result_t additionaldata_isdn(dns_rdata_t *rdata, dns_additionaldatafunc_t add, void *arg) { - add = add; /*unused*/ - arg = arg; /*unused*/ + UNUSED(add); + UNUSED(arg); REQUIRE(rdata->type == 20); diff --git a/lib/dns/rdata/generic/mb_7.c b/lib/dns/rdata/generic/mb_7.c index 66a35fecc7..606292d617 100644 --- a/lib/dns/rdata/generic/mb_7.c +++ b/lib/dns/rdata/generic/mb_7.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: mb_7.c,v 1.21 2000/03/16 01:26:49 bwelling Exp $ */ +/* $Id: mb_7.c,v 1.22 2000/03/16 02:08:50 bwelling Exp $ */ /* Reviewed: Wed Mar 15 17:31:26 PST 2000 by bwelling */ @@ -31,8 +31,8 @@ fromtext_mb(dns_rdataclass_t rdclass, dns_rdatatype_t type, dns_name_t name; isc_buffer_t buffer; - rdclass = rdclass; /*unused*/ - + UNUSED(rdclass); + REQUIRE(type == 7); RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE)); @@ -73,7 +73,7 @@ fromwire_mb(dns_rdataclass_t rdclass, dns_rdatatype_t type, { dns_name_t name; - rdclass = rdclass; /*unused*/ + UNUSED(rdclass); REQUIRE(type == 7); @@ -81,7 +81,7 @@ fromwire_mb(dns_rdataclass_t rdclass, dns_rdatatype_t type, dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL); else dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14); - + dns_name_init(&name, NULL); return (dns_name_fromwire(&name, source, dctx, downcase, target)); } @@ -132,9 +132,9 @@ static inline isc_result_t fromstruct_mb(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source, isc_buffer_t *target) { - rdclass = rdclass; /*unused*/ - source = source; /*unused*/ - target = target; /*unused*/ + UNUSED(rdclass); + UNUSED(source); + UNUSED(target); REQUIRE(type == 7); @@ -143,8 +143,8 @@ fromstruct_mb(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source, static inline isc_result_t tostruct_mb(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) { - target = target; /*unused*/ - mctx = mctx; /*unused*/ + UNUSED(target); + UNUSED(mctx); REQUIRE(rdata->type == 7); diff --git a/lib/dns/rdata/generic/md_3.c b/lib/dns/rdata/generic/md_3.c index 472e3b9050..a2313375e2 100644 --- a/lib/dns/rdata/generic/md_3.c +++ b/lib/dns/rdata/generic/md_3.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: md_3.c,v 1.22 2000/03/16 01:44:08 bwelling Exp $ */ +/* $Id: md_3.c,v 1.23 2000/03/16 02:08:51 bwelling Exp $ */ /* Reviewed: Wed Mar 15 17:48:20 PST 2000 by bwelling */ @@ -31,7 +31,7 @@ fromtext_md(dns_rdataclass_t rdclass, dns_rdatatype_t type, dns_name_t name; isc_buffer_t buffer; - rdclass = rdclass; /*unused*/ + UNUSED(rdclass); REQUIRE(type == 3); @@ -73,7 +73,7 @@ fromwire_md(dns_rdataclass_t rdclass, dns_rdatatype_t type, { dns_name_t name; - rdclass = rdclass; /*unused*/ + UNUSED(rdclass); REQUIRE(type == 3); @@ -132,9 +132,9 @@ static inline isc_result_t fromstruct_md(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source, isc_buffer_t *target) { - rdclass = rdclass; /*unused*/ - source = source; /*unused*/ - target = target; /*unused*/ + UNUSED(rdclass); + UNUSED(source); + UNUSED(target); REQUIRE(type == 3); @@ -143,8 +143,8 @@ fromstruct_md(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source, static inline isc_result_t tostruct_md(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) { - target = target; /*unused*/ - mctx = mctx; /*unused*/ + UNUSED(target); + UNUSED(mctx); REQUIRE(rdata->type == 3);