From: JINMEI Tatuya Date: Tue, 31 Jan 2012 18:02:44 +0000 (-0800) Subject: [1574b] added a comment about why ZoneData::origin_data_ is safe to access X-Git-Tag: trac2351_base~268^2~5^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b51e48caf77ca64a06e1a3206445b1fe0b33261;p=thirdparty%2Fkea.git [1574b] added a comment about why ZoneData::origin_data_ is safe to access in InMemoryZoneFinder::load() --- diff --git a/src/lib/datasrc/memory_datasrc.cc b/src/lib/datasrc/memory_datasrc.cc index 52fd424e7e..2a37bddb2f 100644 --- a/src/lib/datasrc/memory_datasrc.cc +++ b/src/lib/datasrc/memory_datasrc.cc @@ -927,7 +927,10 @@ InMemoryZoneFinder::load(const string& filename) { // If the zone is NSEC3-signed, check if it has NSEC3PARAM if (tmp->nsec3_data_) { - assert(!tmp->origin_data_->isEmpty()); + // Note: origin_data_ is set on creation of ZoneData, and the load + // process only adds new nodes (and their data), so this assertion + // should hold. + assert(tmp->origin_data_ != NULL && !tmp->origin_data_->isEmpty()); if (tmp->origin_data_->getData()->find(RRType::NSEC3PARAM()) == tmp->origin_data_->getData()->end()) { LOG_WARN(logger, DATASRC_MEM_NO_NSEC3PARAM).