From: Kees Monshouwer Date: Wed, 14 May 2014 18:32:43 +0000 (+0200) Subject: pdnssec: clean up unnecessary scoped_ptr in listAllZones() X-Git-Tag: rec-3.6.0-rc1~24^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ecfea3acdbd57e6fc6ebb1baba86cb0c6ae3b3e;p=thirdparty%2Fpdns.git pdnssec: clean up unnecessary scoped_ptr in listAllZones() --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index f32c5058eb..1cb02c8dbf 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -13,7 +13,6 @@ #include "packetcache.hh" #include "zoneparser-tng.hh" #include "signingpipe.hh" -#include #include "dns_random.hh" #ifdef HAVE_SQLITE3 #include "ssqlite3.hh" @@ -23,7 +22,6 @@ StatBag S; PacketCache PC; -using boost::scoped_ptr; namespace po = boost::program_options; po::variables_map g_vm; @@ -641,10 +639,6 @@ int deleteZone(const string &zone) { } int listAllZones(const string &type="") { - scoped_ptr B(new UeberBackend("default")); - - vector domains; - B->getAllDomains(&domains); int kindFilter = -1; if (type.size()) { @@ -660,8 +654,12 @@ int listAllZones(const string &type="") { } } - int count = 0; + UeberBackend B("default"); + vector domains; + B.getAllDomains(&domains); + + int count = 0; for (vector::const_iterator di=domains.begin(); di != domains.end(); di++) { if (di->kind == kindFilter || kindFilter == -1) { cout<zone<