Parcourir la source

[2850] some editorial/style cleanups:

- include style ("" vs <>) per consensus
- null pointer comparison style
- documentation wording fix
JINMEI Tatuya il y a 12 ans
Parent
commit
10f2ae4625

+ 4 - 5
src/lib/datasrc/memory/zone_writer.cc

@@ -12,8 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include "zone_writer.h"
-#include "zone_data.h"
+#include <datasrc/memory/zone_writer.h>
+#include <datasrc/memory/zone_data.h>
 
 #include <memory>
 
@@ -49,7 +49,7 @@ ZoneWriter::load() {
 
     zone_data_ = load_action_(segment_->getMemorySegment());
 
-    if (zone_data_ == NULL) {
+    if (!zone_data_) {
         // Bug inside load_action_.
         isc_throw(isc::InvalidOperation, "No data returned from load action");
     }
@@ -63,9 +63,8 @@ ZoneWriter::install() {
         isc_throw(isc::InvalidOperation, "No data to install");
     }
 
-
     ZoneTable* table(segment_->getHeader().getTable());
-    if (table == NULL) {
+    if (!table) {
         isc_throw(isc::Unexpected, "No zone table present");
     }
     const ZoneTable::AddResult result(table->addZone(

+ 3 - 3
src/lib/datasrc/memory/zone_writer.h

@@ -15,8 +15,8 @@
 #ifndef MEM_ZONE_WRITER_H
 #define MEM_ZONE_WRITER_H
 
-#include "zone_table_segment.h"
-#include "load_action.h"
+#include <datasrc/memory/zone_table_segment.h>
+#include <datasrc/memory/load_action.h>
 
 #include <dns/rrclass.h>
 #include <dns/name.h>
@@ -27,7 +27,7 @@ namespace memory {
 
 /// \brief Does an update to a zone.
 ///
-/// This represents the work of a reload of a zone.  The work is divided
+/// This represents the work of a (re)load of a zone.  The work is divided
 /// into three stages -- load(), install() and cleanup().  They should
 /// be called in this order for the effect to take place.
 ///