From: Axel Viala Date: Sat, 17 Sep 2022 11:01:51 +0000 (+0200) Subject: [clang-tidy] non-init k_size and z_size in secureZone. X-Git-Tag: dnsdist-1.8.0-rc1~219^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11966%2Fhead;p=thirdparty%2Fpdns.git [clang-tidy] non-init k_size and z_size in secureZone. --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index de96f6101f..618b45c83b 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -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");