]> granicus.if.org Git - pdns/commitdiff
Use symbolic names for enum values instead of hard-coded ones.
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 9 Jan 2019 09:33:26 +0000 (10:33 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 9 Jan 2019 11:32:14 +0000 (12:32 +0100)
pdns/dynhandler.cc

index 3eaa9e940f7ab294d9bbbae266593b62dc5c1379..394541583f4de782cb89394d78b06761b6eb0d3c 100644 (file)
@@ -299,8 +299,8 @@ string DLNotifyHandler(const vector<string>&parts, Utility::pid_t ppid)
 
     int total = 0;
     int notified = 0;
-    for (vector<DomainInfo>::const_iterator di=domains.begin(); di != domains.end(); di++) {
-      if (di->kind == 0 || di->kind == 1) { // MASTER and Slave if slave-renotify is enabled
+    for (const auto& di : domains) {
+      if (di->kind == DomainInfo::Master || di->kind == DomainInfo::Slave) { // MASTER and Slave if slave-renotify is enabled
         total++;
         if(Communicator.notifyDomain(di->zone))
           notified++;