Commit ce8b84ce authored by James Brister's avatar James Brister
Browse files

more code review changes.

parent c2bb8559
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: cname_5.c,v 1.21 2000/03/16 01:15:36 brister Exp $ */
/* $Id: cname_5.c,v 1.22 2000/03/16 02:00:31 brister Exp $ */
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
......@@ -41,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
......@@ -63,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
......@@ -83,7 +83,7 @@ fromwire_cname(dns_rdataclass_t rdclass, dns_rdatatype_t type,
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&name, NULL);
return(dns_name_fromwire(&name, source, dctx, downcase, target));
return (dns_name_fromwire(&name, source, dctx, downcase, target));
}
static inline isc_result_t
......@@ -103,7 +103,7 @@ towire_cname(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region);
return(dns_name_towire(&name, cctx, target));
return (dns_name_towire(&name, cctx, target));
}
static inline int
......@@ -127,7 +127,7 @@ compare_cname(dns_rdata_t *rdata1, dns_rdata_t *rdata2)
dns_name_fromregion(&name1, &region1);
dns_name_fromregion(&name2, &region2);
return(dns_name_rdatacompare(&name1, &name2));
return (dns_name_rdatacompare(&name1, &name2));
}
static inline isc_result_t
......@@ -142,7 +142,7 @@ fromstruct_cname(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
UNUSED(source);
UNUSED(target);
return(DNS_R_NOTIMPLEMENTED);
return (DNS_R_NOTIMPLEMENTED);
}
static inline isc_result_t
......@@ -155,7 +155,7 @@ tostruct_cname(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
UNUSED(target);
UNUSED(mctx);
return(DNS_R_NOTIMPLEMENTED);
return (DNS_R_NOTIMPLEMENTED);
}
static inline void
......@@ -174,7 +174,7 @@ 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
......@@ -189,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 */
......@@ -15,9 +15,11 @@
* SOFTWARE.
*/
/* $Id: gpos_27.c,v 1.12 2000/03/16 01:31:03 brister Exp $ */
/* $Id: gpos_27.c,v 1.13 2000/03/16 02:00:33 brister Exp $ */
/* RFC 1712 */
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
/* RFC 1712 */
#ifndef RDATA_GENERIC_GPOS_27_C
#define RDATA_GENERIC_GPOS_27_C
......@@ -41,7 +43,7 @@ fromtext_gpos(dns_rdataclass_t rdclass, dns_rdatatype_t type,
ISC_FALSE));
RETERR(txt_fromtext(&token.value.as_textregion, target));
}
return(DNS_R_SUCCESS);
return (DNS_R_SUCCESS);
}
static inline isc_result_t
......@@ -63,7 +65,7 @@ totext_gpos(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
RETERR(str_totext(" ", target));
}
return(DNS_R_SUCCESS);
return (DNS_R_SUCCESS);
}
static inline isc_result_t
......@@ -81,7 +83,7 @@ fromwire_gpos(dns_rdataclass_t rdclass, dns_rdatatype_t type,
for (i = 0 ; i < 3; i++)
RETERR(txt_fromwire(source, target));
return(DNS_R_SUCCESS);
return (DNS_R_SUCCESS);
}
static inline isc_result_t
......@@ -92,7 +94,7 @@ towire_gpos(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
UNUSED(cctx);
return(mem_tobuffer(target, rdata->data, rdata->length));
return (mem_tobuffer(target, rdata->data, rdata->length));
}
static inline int
......@@ -107,7 +109,7 @@ compare_gpos(dns_rdata_t *rdata1, dns_rdata_t *rdata2)
dns_rdata_toregion(rdata1, &r1);
dns_rdata_toregion(rdata2, &r2);
return(compare_region(&r1, &r2));
return (compare_region(&r1, &r2));
}
static inline isc_result_t
......@@ -119,10 +121,10 @@ fromstruct_gpos(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
UNUSED(rdclass);
source = source;
target = target;
UNUSED(source);
UNUSED(target);
return(DNS_R_NOTIMPLEMENTED);
return (DNS_R_NOTIMPLEMENTED);
}
static inline isc_result_t
......@@ -131,10 +133,10 @@ tostruct_gpos(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
REQUIRE(rdata->type == 27);
target = target;
mctx = mctx;
UNUSED(target);
UNUSED(mctx);
return(DNS_R_NOTIMPLEMENTED);
return (DNS_R_NOTIMPLEMENTED);
}
static inline void
......@@ -153,7 +155,7 @@ additionaldata_gpos(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
......@@ -165,7 +167,7 @@ digest_gpos(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg)
dns_rdata_toregion(rdata, &r);
return((digest)(arg, &r));
return ((digest)(arg, &r));
}
#endif /* RDATA_GENERIC_GPOS_27_C */
......@@ -15,7 +15,9 @@
* SOFTWARE.
*/
/* $Id: mf_4.c,v 1.20 2000/03/16 01:37:14 brister Exp $ */
/* $Id: mf_4.c,v 1.21 2000/03/16 02:00:34 brister Exp $ */
/* reviewed: Wed Mar 15 17:47:33 PST 2000 by brister */
#ifndef RDATA_GENERIC_MF_4_C
#define RDATA_GENERIC_MF_4_C
......@@ -39,7 +41,7 @@ fromtext_mf(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_mf(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
......@@ -81,7 +83,7 @@ fromwire_mf(dns_rdataclass_t rdclass, dns_rdatatype_t type,
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&name, NULL);
return(dns_name_fromwire(&name, source, dctx, downcase, target));
return (dns_name_fromwire(&name, source, dctx, downcase, target));
}
static inline isc_result_t
......@@ -101,7 +103,7 @@ towire_mf(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region);
return(dns_name_towire(&name, cctx, target));
return (dns_name_towire(&name, cctx, target));
}
static inline int
......@@ -125,7 +127,7 @@ compare_mf(dns_rdata_t *rdata1, dns_rdata_t *rdata2)
dns_name_fromregion(&name1, &region1);
dns_name_fromregion(&name2, &region2);
return(dns_name_rdatacompare(&name1, &name2));
return (dns_name_rdatacompare(&name1, &name2));
}
static inline isc_result_t
......@@ -140,7 +142,7 @@ fromstruct_mf(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
UNUSED(source);
UNUSED(target);
return(DNS_R_NOTIMPLEMENTED);
return (DNS_R_NOTIMPLEMENTED);
}
static inline isc_result_t
......@@ -152,7 +154,7 @@ tostruct_mf(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
UNUSED(target);
UNUSED(mctx);
return(DNS_R_NOTIMPLEMENTED);
return (DNS_R_NOTIMPLEMENTED);
}
static inline void
......@@ -175,7 +177,7 @@ additionaldata_mf(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region);
return((add)(arg, &name, dns_rdatatype_a));
return ((add)(arg, &name, dns_rdatatype_a));
}
static inline isc_result_t
......@@ -190,7 +192,7 @@ digest_mf(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_MF_4_C */
......@@ -15,7 +15,9 @@
* SOFTWARE.
*/
/* $Id: mg_8.c,v 1.19 2000/03/16 01:40:27 brister Exp $ */
/* $Id: mg_8.c,v 1.20 2000/03/16 02:00:35 brister Exp $ */
/* reviewed: Wed Mar 15 17:49:21 PST 2000 by brister */
#ifndef RDATA_GENERIC_MG_8_C
#define RDATA_GENERIC_MG_8_C
......
......@@ -15,7 +15,9 @@
* SOFTWARE.
*/
/* $Id: minfo_14.c,v 1.19 2000/02/03 23:43:02 halley Exp $ */
/* $Id: minfo_14.c,v 1.20 2000/03/16 02:00:37 brister Exp $ */
/* reviewed: Wed Mar 15 17:45:32 PST 2000 by brister */
#ifndef RDATA_GENERIC_MINFO_14_C
#define RDATA_GENERIC_MINFO_14_C
......@@ -32,7 +34,7 @@ fromtext_minfo(dns_rdataclass_t rdclass, dns_rdatatype_t type,
REQUIRE(type == 14);
rdclass = rdclass; /*unused*/
UNUSED(rdclass);
for (i = 0; i < 2 ; i++) {
RETERR(gettoken(lexer, &token, isc_tokentype_string,
......@@ -96,7 +98,7 @@ fromwire_minfo(dns_rdataclass_t rdclass, dns_rdatatype_t type,
else
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
rdclass = rdclass; /*unused*/
UNUSED(rdclass);
dns_name_init(&rmail, NULL);
dns_name_init(&email, NULL);
......@@ -106,7 +108,8 @@ fromwire_minfo(dns_rdataclass_t rdclass, dns_rdatatype_t type,
}
static inline isc_result_t
towire_minfo(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
towire_minfo(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
{
isc_region_t region;
dns_name_t rmail;
dns_name_t email;
......@@ -135,7 +138,8 @@ towire_minfo(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
}
static inline int
compare_minfo(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
compare_minfo(dns_rdata_t *rdata1, dns_rdata_t *rdata2)
{
isc_region_t region1;
isc_region_t region2;
dns_name_t name1;
......@@ -179,27 +183,29 @@ fromstruct_minfo(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
REQUIRE(type == 14);
rdclass = rdclass; /*unused*/
UNUSED(rdclass);
source = source;
target = target;
UNUSED(source);
UNUSED(target);
return (DNS_R_NOTIMPLEMENTED);
}
static inline isc_result_t
tostruct_minfo(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
tostruct_minfo(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
{
REQUIRE(rdata->type == 14);
target = target;
mctx = mctx;
UNUSED(target);
UNUSED(mctx);
return (DNS_R_NOTIMPLEMENTED);
}
static inline void
freestruct_minfo(void *source) {
freestruct_minfo(void *source)
{
REQUIRE(source != NULL);
REQUIRE(ISC_FALSE); /*XXX*/
}
......@@ -217,7 +223,8 @@ additionaldata_minfo(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
}
static inline isc_result_t
digest_minfo(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
digest_minfo(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg)
{
isc_region_t r;
dns_name_t name;
isc_result_t result;
......
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