summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-10 22:44:01 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-14 15:22:18 +0200
commit69b7654484c3f16d61f315275abb15cc062d190e (patch)
tree05067d659254fc67b40dbd05b291decd30f226b3
parent90b56f542e0ae722c843265f4e6250cc0a096f5d (diff)
fix 'Dead assignment' by dropping unneeded boolean
Reported-By: scan-build Git-Dch: Ignore
-rw-r--r--apt-pkg/acquire.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 433a2a6fa..6a800002e 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -467,9 +467,8 @@ static void CheckDropPrivsMustBeDisabled(pkgAcquire const &Fetcher)
if (seteuid(pw->pw_uid) != 0)
_error->Errno("seteuid", "seteuid %u failed", pw->pw_uid);
- bool dropPrivs = true;
for (pkgAcquire::ItemCIterator I = Fetcher.ItemsBegin();
- I != Fetcher.ItemsEnd() && dropPrivs == true; ++I)
+ I != Fetcher.ItemsEnd(); ++I)
{
std::string filename = (*I)->DestFile;
if (filename.empty())
@@ -496,7 +495,6 @@ static void CheckDropPrivsMustBeDisabled(pkgAcquire const &Fetcher)
if (faccessat(-1, dirname.c_str(), R_OK | W_OK | X_OK, AT_EACCESS | AT_SYMLINK_NOFOLLOW) != 0)
{
- dropPrivs = false;
_error->WarningE("pkgAcquire::Run", _("Can't drop privileges for downloading as file '%s' couldn't be accessed by user '%s'."),
filename.c_str(), SandboxUser.c_str());
_config->Set("APT::Sandbox::User", "");