From: Otto Moerbeek Date: Wed, 9 Jan 2019 09:33:26 +0000 (+0100) Subject: Use symbolic names for enum values instead of hard-coded ones. X-Git-Tag: rec-4.2.0-alpha1~44^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be207d3d21fbb18b51c21a71d1f6bc417e44c886;p=thirdparty%2Fpdns.git Use symbolic names for enum values instead of hard-coded ones. --- diff --git a/pdns/dynhandler.cc b/pdns/dynhandler.cc index 3eaa9e940f..394541583f 100644 --- a/pdns/dynhandler.cc +++ b/pdns/dynhandler.cc @@ -299,8 +299,8 @@ string DLNotifyHandler(const vector&parts, Utility::pid_t ppid) int total = 0; int notified = 0; - for (vector::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++;