2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 14:35:29 +00:00

[1579] more cleanups, mostly editorial ones.

- indentation
- spelling: 'other else' should be 'otherwise'
- constify
- avoid using an unnecessary temporary variable
This commit is contained in:
JINMEI Tatuya
2012-04-11 18:02:33 -07:00
parent 52ee8a2874
commit 2d99288b34
2 changed files with 12 additions and 12 deletions

View File

@@ -666,8 +666,8 @@ DatabaseClient::Finder::findWildcardMatch(const isc::dns::Name& name,
LOG_DEBUG(logger, DBG_TRACE_DETAILED, LOG_DEBUG(logger, DBG_TRACE_DETAILED,
DATASRC_DATABASE_WILDCARD_EMPTY). DATASRC_DATABASE_WILDCARD_EMPTY).
arg(accessor_->getDBName()).arg(wildcard).arg(name); arg(accessor_->getDBName()).arg(wildcard).arg(name);
FindResultFlags flags = (RESULT_WILDCARD | const FindResultFlags flags = (RESULT_WILDCARD |
dnssec_ctx.getResultFlags()); dnssec_ctx.getResultFlags());
if (dnssec_ctx.isNSEC()) { if (dnssec_ctx.isNSEC()) {
ConstRRsetPtr nsec = findNSECCover(Name(wildcard)); ConstRRsetPtr nsec = findNSECCover(Name(wildcard));
if (nsec) { if (nsec) {
@@ -812,11 +812,10 @@ DatabaseClient::Finder::FindDNSSECContext::getDNSSECRRset(const Name& name,
isc_throw(DataSourceError, "no Finder to query"); isc_throw(DataSourceError, "no Finder to query");
} }
const bool is_origin = isOrigin(name); const bool is_origin = isOrigin(name);
bool is_nsec = isNSEC(); WantedTypes final_types(isNSEC() ? FINAL_TYPES() : FINAL_TYPES_NO_NSEC());
WantedTypes final_types(is_nsec ? FINAL_TYPES() : FINAL_TYPES_NO_NSEC());
final_types.insert(type); final_types.insert(type);
return (finderp_->getRRsets(name.toText(), final_types, !is_origin, NULL, return (finderp_->getRRsets(name.toText(), final_types, !is_origin, NULL,
type == RRType::ANY())); type == RRType::ANY()));
} }
bool bool
@@ -836,7 +835,7 @@ DatabaseClient::Finder::FindDNSSECContext::getResultFlags() {
return (RESULT_NSEC3_SIGNED); return (RESULT_NSEC3_SIGNED);
} else { } else {
// If it is a DNSSEC query and the zone is signed with NSEC, it should // If it is a DNSSEC query and the zone is signed with NSEC, it should
// return RESULT_NSEC_SIGNED, other else, return RESULT_DEFAULT // return RESULT_NSEC_SIGNED, otherwise, return RESULT_DEFAULT
return (isNSEC() ? RESULT_NSEC_SIGNED : RESULT_DEFAULT); return (isNSEC() ? RESULT_NSEC_SIGNED : RESULT_DEFAULT);
} }
} }

View File

@@ -693,7 +693,7 @@ public:
/// ///
/// Get the ResultFlags for findInterval. If the zone is signed with /// Get the ResultFlags for findInterval. If the zone is signed with
/// NSEC3, it will return RESULT_NSEC3_SIGNED. If it is signed with /// NSEC3, it will return RESULT_NSEC3_SIGNED. If it is signed with
/// NSEC, it wll return RESULT_NSEC_SIGNED. Other else it will return /// NSEC, it wll return RESULT_NSEC_SIGNED. Otherwise it will return
/// RESULT_DEFAULT. It wraps getRRsets function to do some special /// RESULT_DEFAULT. It wraps getRRsets function to do some special
/// search, like searching NSEC RRset by getNSECRRset function, /// search, like searching NSEC RRset by getNSECRRset function,
/// searching DNSSEC related RRset and RRsig by getNSECRRset. /// searching DNSSEC related RRset and RRsig by getNSECRRset.
@@ -753,17 +753,17 @@ public:
/// \brief Check whether the zone file is signed with NSECi3. /// \brief Check whether the zone file is signed with NSECi3.
/// ///
/// It checks whether the zone file is signed with NSEC3. If /// It checks whether the zone file is signed with NSEC3. If
/// yes, return true, other else return false. /// yes, return true, otherwise return false.
/// ///
/// \return True for NSEC3, false for other else. /// \return True for NSEC3, false otherwise.
bool isNSEC3(); bool isNSEC3();
/// \brief Check whether the zone file is signed with NSEC. /// \brief Check whether the zone file is signed with NSEC.
/// ///
/// It checks whether the zone file is signed with NSEC, If /// It checks whether the zone file is signed with NSEC, If
/// yes, return true, other else return false. /// yes, return true, otherwise return false.
/// ///
/// \return True for NSEC, false for other else. /// \return True for NSEC, false otherwise.
bool isNSEC(); bool isNSEC();
/// \brief Check whether the name is origin name of the zone. /// \brief Check whether the name is origin name of the zone.
@@ -788,7 +788,8 @@ public:
/// It should init the attributes of this entity. Check whether /// It should init the attributes of this entity. Check whether
/// it is the NSEC or NSEC3 zone file if it is a dnssec query. /// it is the NSEC or NSEC3 zone file if it is a dnssec query.
/// ///
/// \note If the entity is initalized, no need to init it again. /// \note If the entity is initialized, no need to init it
/// again.
void init(); void init();
/// \brief Check whether the entity is initalized. /// \brief Check whether the entity is initalized.