summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-08-08 15:40:15 +0200
committerMichael Vogt <mvo@debian.org>2013-08-08 15:40:15 +0200
commitf52037d629aea696f938015e7f1ec037eb079af8 (patch)
tree925b27ed34466ec12778ba90728b0d1b358fc7f8 /apt-pkg/deb
parente9737c7f6a3e03b2975927ef9b04c1194026ed9c (diff)
fix -Wall errors
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/dpkgpm.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index b0bd6b184..34ae4e593 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -134,7 +134,8 @@ static void dpkgChrootDirectory()
std::cerr << "Chrooting into " << chrootDir << std::endl;
if (chroot(chrootDir.c_str()) != 0)
_exit(100);
- chdir("/");
+ if (chdir("/") != 0)
+ _exit(100);
}
/*}}}*/
@@ -755,7 +756,8 @@ bool pkgDPkgPM::OpenLog()
pw = getpwnam("root");
gr = getgrnam("adm");
if (pw != NULL && gr != NULL)
- chown(logfile_name.c_str(), pw->pw_uid, gr->gr_gid);
+ if(chown(logfile_name.c_str(), pw->pw_uid, gr->gr_gid) != 0)
+ _error->Errno("OpenLog", "chown failed");
chmod(logfile_name.c_str(), 0640);
fprintf(d->term_out, "\nLog started: %s\n", timestr);
}