diff options
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-cache.cc | 6 | ||||
-rw-r--r-- | cmdline/apt-get.cc | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index a2c445401..117a44292 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -749,9 +749,9 @@ static bool ShowDepends(CommandLine &CmdL, bool const RevDepends) } // Display all solutions - SPtrArray<pkgCache::Version *> List = D.AllTargets(); - pkgPrioSortList(*Cache,List); - for (pkgCache::Version **I = List; *I != 0; I++) + std::unique_ptr<pkgCache::Version *[]> List(D.AllTargets()); + pkgPrioSortList(*Cache,List.get()); + for (pkgCache::Version **I = List.get(); *I != 0; I++) { pkgCache::VerIterator V(*Cache,*I); if (V != Cache->VerP + V.ParentPkg()->VersionList || diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 0b79c507a..61ed41164 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -701,7 +701,7 @@ static bool DoSource(CommandLine &CmdL) AcqTextStatus Stat(std::cout, ScreenWidth,_config->FindI("quiet",0)); pkgAcquire Fetcher(&Stat); - SPtrArray<DscFile> Dsc = new DscFile[CmdL.FileSize()]; + std::unique_ptr<DscFile[]> Dsc(new DscFile[CmdL.FileSize()]); // insert all downloaded uris into this set to avoid downloading them // twice |