From: Miod Vallat Date: Thu, 9 Jan 2025 14:14:29 +0000 (+0100) Subject: Silence clang-tidy X-Git-Tag: dnsdist-2.0.0-alpha1~175^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddc19815605c0586ca4fd03601ca0281a1ed6c90;p=thirdparty%2Fpdns.git Silence clang-tidy --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index b0f71c63d9..a808f4711e 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -2515,7 +2515,7 @@ static int addOrSetMeta(const DNSName& zone, const string& kind, const vector& cmds, DNSSECKeeper& dk) +static int addZoneKey(vector& cmds, DNSSECKeeper& dk) //NOLINT(readability-identifier-length) { if(cmds.size() < 3 ) { cerr << "Syntax: pdnsutil add-zone-key ZONE [zsk|ksk] [BITS] [active|inactive] [rsasha1|rsasha1-nsec3-sha1|rsasha256|rsasha512|ecdsa256|ecdsa384"; @@ -2532,8 +2532,8 @@ static int addZoneKey(vector& cmds, DNSSECKeeper& dk) } DNSName zone(cmds.at(1)); - UeberBackend B("default"); - DomainInfo di; + UeberBackend B("default"); //NOLINT(readability-identifier-length) + DomainInfo di; //NOLINT(readability-identifier-length) if (!B.getDomainInfo(zone, di)){ cerr << "No such zone in the database" << endl; @@ -2547,11 +2547,13 @@ static int addZoneKey(vector& cmds, DNSSECKeeper& dk) int algorithm=DNSSECKeeper::ECDSA256; bool active=false; bool published=true; - for(unsigned int n=2; n < cmds.size(); ++n) { - if (pdns_iequals(cmds.at(n), "zsk")) + for(unsigned int n=2; n < cmds.size(); ++n) { //NOLINT(readability-identifier-length) + if (pdns_iequals(cmds.at(n), "zsk")) { keyOrZone = false; - else if (pdns_iequals(cmds.at(n), "ksk")) + } + else if (pdns_iequals(cmds.at(n), "ksk")) { keyOrZone = true; + } else if ((tmp_algo = DNSSECKeeper::shorthand2algorithm(cmds.at(n))) > 0) { algorithm = tmp_algo; } @@ -2575,21 +2577,21 @@ static int addZoneKey(vector& cmds, DNSSECKeeper& dk) return EXIT_FAILURE; } } - int64_t id{-1}; + int64_t id{-1}; //NOLINT(readability-identifier-length) if (!dk.addKey(zone, keyOrZone, algorithm, id, bits, active, published)) { cerr<<"Adding key failed, perhaps DNSSEC not enabled in configuration?"<