From 319790f4f86f595724fb2bd5aa6274d345469010 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 20 Mar 2012 19:23:32 +0100 Subject: * methods/rred.cc: - check return of writev() as gcc recommends * methods/mirror.cc: - check return of chdir() as gcc recommends * apt-pkg/deb/dpkgpm.cc: - check return of write() a gcc recommends * apt-inst/deb/debfile.cc: - check return of chdir() as gcc recommends * apt-inst/deb/dpkgdb.cc: - check return of chdir() as gcc recommends --- apt-inst/deb/debfile.cc | 2 +- apt-inst/deb/dpkgdb.cc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'apt-inst/deb') diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index 4bd065cf8..aeab82e82 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -121,7 +121,7 @@ bool debDebFile::ExtractControl(pkgDataBase &DB) // Switch out of the tmp directory. if (chdir(Cwd.c_str()) != 0) - chdir("/"); + return _error->Errno("chdir",_("Unable to change to %s"),Cwd.c_str()); return true; } diff --git a/apt-inst/deb/dpkgdb.cc b/apt-inst/deb/dpkgdb.cc index 819c123f6..71a0c2177 100644 --- a/apt-inst/deb/dpkgdb.cc +++ b/apt-inst/deb/dpkgdb.cc @@ -286,8 +286,7 @@ bool debDpkgDB::ReadFList(OpProgress &Progress) delete [] Buffer; if (chdir(Cwd.c_str()) != 0) - chdir("/"); - + return _error->Errno("chdir",_("Unable to change to %s"),Cwd.c_str()); return !_error->PendingError(); } /*}}}*/ -- cgit v1.2.3