From f52037d629aea696f938015e7f1ec037eb079af8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 8 Aug 2013 15:40:15 +0200 Subject: fix -Wall errors --- ftparchive/writer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ftparchive') diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 3283128d8..7ecfe78ed 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -284,7 +284,8 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath, if (link(FileName.c_str(),OriginalPath) != 0) { // Panic! Restore the symlink - symlink(OldLink,OriginalPath); + if (symlink(OldLink,OriginalPath) != 0) + _error->Errno("symlink", "failed to restore symlink"); return _error->Errno("link",_("*** Failed to link %s to %s"), FileName.c_str(), OriginalPath); -- cgit v1.2.3 From 1c946b5766c8f23e20d0032fcd9a01e2f891fbf9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 23 Aug 2013 09:15:00 +0200 Subject: ftparchive/override.cc: fix "skip empty lines" code, the pointer needs to get de-referenced first --- ftparchive/override.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ftparchive') diff --git a/ftparchive/override.cc b/ftparchive/override.cc index 760c20120..1288ff133 100644 --- a/ftparchive/override.cc +++ b/ftparchive/override.cc @@ -49,7 +49,7 @@ bool Override::ReadOverride(string const &File,bool const &Source) // Strip space leading up to the package name, skip blank lines char *Pkg = Line; for (; isspace(*Pkg) && *Pkg != 0;Pkg++); - if (Pkg == 0) + if (*Pkg == 0) continue; // Find the package and zero.. -- cgit v1.2.3