2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Remove redundant parentheses from the return statement

This commit is contained in:
Ondřej Surý
2024-11-19 10:38:03 +01:00
parent 3873b0c279
commit 0258850f20
437 changed files with 10832 additions and 10856 deletions

View File

@@ -59,7 +59,7 @@ dns_nsec_isset(const unsigned char *array, unsigned int type) {
shift = 7 - (type % 8);
mask = 1 << shift;
return ((byte & mask) != 0);
return (byte & mask) != 0;
}
unsigned int
@@ -70,7 +70,7 @@ dns_nsec_compressbitmap(unsigned char *map, const unsigned char *raw,
int octet;
if (raw == NULL) {
return (0);
return 0;
}
for (window = 0; window < 256; window++) {
@@ -95,7 +95,7 @@ dns_nsec_compressbitmap(unsigned char *map, const unsigned char *raw,
map += octet + 1;
raw += 32;
}
return ((unsigned int)(map - start));
return (unsigned int)(map - start);
}
isc_result_t
@@ -130,7 +130,7 @@ dns_nsec_buildrdata(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
rdsiter = NULL;
result = dns_db_allrdatasets(db, node, version, 0, 0, &rdsiter);
if (result != ISC_R_SUCCESS) {
return (result);
return result;
}
for (result = dns_rdatasetiter_first(rdsiter); result == ISC_R_SUCCESS;
result = dns_rdatasetiter_next(rdsiter))
@@ -165,7 +165,7 @@ dns_nsec_buildrdata(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
dns_rdatasetiter_destroy(&rdsiter);
if (result != ISC_R_NOMORE) {
return (result);
return result;
}
nsec_bits += dns_nsec_compressbitmap(nsec_bits, bm, max_type);
@@ -174,7 +174,7 @@ dns_nsec_buildrdata(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
INSIST(r.length <= DNS_NSEC_BUFFERSIZE);
dns_rdata_fromregion(rdata, dns_db_class(db), dns_rdatatype_nsec, &r);
return (ISC_R_SUCCESS);
return ISC_R_SUCCESS;
}
isc_result_t
@@ -206,7 +206,7 @@ failure:
if (dns_rdataset_isassociated(&rdataset)) {
dns_rdataset_disassociate(&rdataset);
}
return (result);
return result;
}
bool
@@ -244,7 +244,7 @@ dns_nsec_typepresent(dns_rdata_t *nsec, dns_rdatatype_t type) {
break;
}
dns_rdata_freestruct(&nsecstruct);
return (present);
return present;
}
isc_result_t
@@ -261,7 +261,7 @@ dns_nsec_nseconly(dns_db_t *db, dns_dbversion_t *version, dns_diff_t *diff,
result = dns_db_getoriginnode(db, &node);
if (result != ISC_R_SUCCESS) {
return (result);
return result;
}
result = dns_db_findrdataset(db, node, version, dns_rdatatype_dnskey, 0,
@@ -272,7 +272,7 @@ dns_nsec_nseconly(dns_db_t *db, dns_dbversion_t *version, dns_diff_t *diff,
*answer = false;
}
if (result != ISC_R_SUCCESS) {
return (result);
return result;
}
for (result = dns_rdataset_first(&rdataset); result == ISC_R_SUCCESS;
result = dns_rdataset_next(&rdataset))
@@ -323,7 +323,7 @@ dns_nsec_nseconly(dns_db_t *db, dns_dbversion_t *version, dns_diff_t *diff,
*answer = false;
result = ISC_R_SUCCESS;
}
return (result);
return result;
}
/*%
@@ -355,7 +355,7 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
result = dns_rdataset_first(nsecset);
if (result != ISC_R_SUCCESS) {
(*logit)(arg, ISC_LOG_DEBUG(3), "failure processing NSEC set");
return (result);
return result;
}
dns_rdataset_current(nsecset, &rdata);
@@ -365,7 +365,7 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
{
(*logit)(arg, ISC_LOG_DEBUG(3),
"NSEC missing RRSIG and/or NSEC from type map");
return (ISC_R_IGNORE);
return ISC_R_IGNORE;
}
#endif
@@ -378,7 +378,7 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
*/
(*logit)(arg, ISC_LOG_DEBUG(3),
"NSEC does not cover name, before NSEC");
return (ISC_R_IGNORE);
return ISC_R_IGNORE;
}
if (order == 0) {
@@ -398,7 +398,7 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
*/
(*logit)(arg, ISC_LOG_DEBUG(3),
"ignoring parent nsec");
return (ISC_R_IGNORE);
return ISC_R_IGNORE;
}
} else if (atparent && ns && soa) {
/*
@@ -406,7 +406,7 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
* It can not be legitimately used here.
*/
(*logit)(arg, ISC_LOG_DEBUG(3), "ignoring child nsec");
return (ISC_R_IGNORE);
return ISC_R_IGNORE;
}
if (type == dns_rdatatype_cname || type == dns_rdatatype_nxt ||
type == dns_rdatatype_nsec || type == dns_rdatatype_key ||
@@ -417,10 +417,10 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
(*logit)(arg, ISC_LOG_DEBUG(3),
"nsec proves name exists (owner) data=%d",
*data);
return (ISC_R_SUCCESS);
return ISC_R_SUCCESS;
}
(*logit)(arg, ISC_LOG_DEBUG(3), "NSEC proves CNAME exists");
return (ISC_R_IGNORE);
return ISC_R_IGNORE;
}
if (relation == dns_namereln_subdomain &&
@@ -434,7 +434,7 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
* It can not be legitimately used here.
*/
(*logit)(arg, ISC_LOG_DEBUG(3), "ignoring parent nsec");
return (ISC_R_IGNORE);
return ISC_R_IGNORE;
}
if (relation == dns_namereln_subdomain &&
@@ -442,19 +442,19 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
{
(*logit)(arg, ISC_LOG_DEBUG(3), "nsec proves covered by dname");
*exists = false;
return (DNS_R_DNAME);
return DNS_R_DNAME;
}
result = dns_rdata_tostruct(&rdata, &nsec, NULL);
if (result != ISC_R_SUCCESS) {
return (result);
return result;
}
relation = dns_name_fullcompare(&nsec.next, name, &order, &nlabels);
if (order == 0) {
dns_rdata_freestruct(&nsec);
(*logit)(arg, ISC_LOG_DEBUG(3),
"ignoring nsec matches next name");
return (ISC_R_IGNORE);
return ISC_R_IGNORE;
}
if (order < 0 && !dns_name_issubdomain(nsecname, &nsec.next)) {
@@ -464,7 +464,7 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
dns_rdata_freestruct(&nsec);
(*logit)(arg, ISC_LOG_DEBUG(3),
"ignoring nsec because name is past end of range");
return (ISC_R_IGNORE);
return ISC_R_IGNORE;
}
if (order > 0 && relation == dns_namereln_subdomain) {
@@ -473,7 +473,7 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
dns_rdata_freestruct(&nsec);
*exists = true;
*data = false;
return (ISC_R_SUCCESS);
return ISC_R_SUCCESS;
}
if (wild != NULL) {
dns_name_t common;
@@ -493,13 +493,13 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
dns_rdata_freestruct(&nsec);
(*logit)(arg, ISC_LOG_DEBUG(3),
"failure generating wildcard name");
return (result);
return result;
}
}
dns_rdata_freestruct(&nsec);
(*logit)(arg, ISC_LOG_DEBUG(3), "nsec range ok");
*exists = false;
return (ISC_R_SUCCESS);
return ISC_R_SUCCESS;
}
bool
@@ -523,10 +523,10 @@ dns_nsec_requiredtypespresent(dns_rdataset_t *nsecset) {
!dns_nsec_typepresent(&rdata, dns_rdatatype_rrsig))
{
dns_rdataset_disassociate(&rdataset);
return (false);
return false;
}
found = true;
}
dns_rdataset_disassociate(&rdataset);
return (found);
return found;
}