summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/gpgv.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-01-16 22:19:49 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-01-16 22:19:49 +0100
commit9ce3cfc9309c55cc01018c88c1ca82779fd74431 (patch)
treee113a963a732f497d0362d3fff9e5b3834d5a175 /apt-pkg/contrib/gpgv.cc
parent62d8a765b9b37354efab6ca838cbdb7f347f7cac (diff)
correct some style/performance/warnings from cppcheck
The most "visible" change is from utime to utimensat/futimens as the first one isn't part of POSIX anymore. Reported-By: cppcheck Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/contrib/gpgv.cc')
-rw-r--r--apt-pkg/contrib/gpgv.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/apt-pkg/contrib/gpgv.cc b/apt-pkg/contrib/gpgv.cc
index 0a469dd7a..9de227062 100644
--- a/apt-pkg/contrib/gpgv.cc
+++ b/apt-pkg/contrib/gpgv.cc
@@ -260,8 +260,7 @@ bool SplitClearSignedFile(std::string const &InFile, FileFd * const ContentFile,
char *buf = NULL;
size_t buf_size = 0;
- ssize_t line_len = 0;
- while ((line_len = getline(&buf, &buf_size, in)) != -1)
+ while (getline(&buf, &buf_size, in) != -1)
{
_strrstrip(buf);
if (found_message_start == false)
@@ -355,7 +354,7 @@ bool OpenMaybeClearSignedFile(std::string const &ClearSignedFileName, FileFd &Me
return _error->Error("Couldn't open temporary file to work with %s", ClearSignedFileName.c_str());
_error->PushToStack();
- bool const splitDone = SplitClearSignedFile(ClearSignedFileName.c_str(), &MessageFile, NULL, NULL);
+ bool const splitDone = SplitClearSignedFile(ClearSignedFileName, &MessageFile, NULL, NULL);
bool const errorDone = _error->PendingError();
_error->MergeWithStack();
if (splitDone == false)