]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
[clang-tidy] non-init k_size and z_size in secureZone. 11966/head
authorAxel Viala <axel.viala@darnuria.eu>
Sat, 17 Sep 2022 11:01:51 +0000 (13:01 +0200)
committerAxel Viala <axel.viala@darnuria.eu>
Sun, 6 Nov 2022 12:48:03 +0000 (13:48 +0100)
pdns/pdnsutil.cc

index de96f6101f440a5957ada99b4ae998ee9a2cf19c..618b45c83b982e651715da9c89938ef706462f27 100644 (file)
@@ -2188,16 +2188,14 @@ static bool showZone(DNSSECKeeper& dk, const DNSName& zone, bool exportDS = fals
 
 static bool secureZone(DNSSECKeeper& dk, const DNSName& zone)
 {
-  // parse attribute
-  int k_size;
-  int z_size;
   // temp var for addKey
   int64_t id;
 
+  // parse attribute
   string k_algo = ::arg()["default-ksk-algorithm"];
-  k_size = ::arg().asNum("default-ksk-size");
+  int k_size = ::arg().asNum("default-ksk-size");
   string z_algo = ::arg()["default-zsk-algorithm"];
-  z_size = ::arg().asNum("default-zsk-size");
+  int z_size = ::arg().asNum("default-zsk-size");
 
   if (k_size < 0) {
      throw runtime_error("KSK key size must be equal to or greater than 0");