diff options
author | Michael Vogt <mvo@debian.org> | 2013-08-27 08:38:05 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-08-27 08:38:05 +0200 |
commit | be0270de5f676152e9315d858a2d68b1a61cc37c (patch) | |
tree | 0ed2258395415f59ac7c26517998de7d3b16ce93 | |
parent | 17e4360804ffd2b5530b8ceb0e42834eb99e526e (diff) |
use SPtr<pkgProblemResolver> to simply code
-rw-r--r-- | apt-private/private-install.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index d5052fcc0..4e29fbbf6 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -595,7 +595,7 @@ bool DoInstall(CommandLine &CmdL) if (Cache->BrokenCount() != 0) BrokenFix = true; - pkgProblemResolver* Fix = NULL; + SPtr<pkgProblemResolver> Fix; if (_config->FindB("APT::Get::CallResolver", true) == true) Fix = new pkgProblemResolver(Cache); @@ -628,8 +628,6 @@ bool DoInstall(CommandLine &CmdL) if (_error->PendingError() == true) { helper.showVirtualPackageErrors(Cache); - if (Fix != NULL) - delete Fix; return false; } @@ -663,8 +661,6 @@ bool DoInstall(CommandLine &CmdL) if (_error->PendingError() == true) { - if (Fix != NULL) - delete Fix; return false; } @@ -675,8 +671,6 @@ bool DoInstall(CommandLine &CmdL) { c1out << _("You might want to run 'apt-get -f install' to correct these:") << std::endl; ShowBroken(c1out,Cache,false); - if (Fix != NULL) - delete Fix; return _error->Error(_("Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).")); } @@ -684,7 +678,6 @@ bool DoInstall(CommandLine &CmdL) { // Call the scored problem resolver Fix->Resolve(true); - delete Fix; } // Now we check the state of the packages, |