summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debmetaindex.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-06-17 18:28:52 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2019-06-17 18:28:52 +0200
commit97553e635d2265ec4aad96b00b1fd72d98437f15 (patch)
treefe7b9d415707408dccfc9ec329e6e98cff9d7e0a /apt-pkg/deb/debmetaindex.cc
parent0cef11a38f14432bf36bf34225ec06c52b2cfb65 (diff)
RFC1123StrToTime: Accept const std::string& as first argument
We are converting to std::string anyway by passing to istringstream, and this removes the need for .c_str() in callers.
Diffstat (limited to 'apt-pkg/deb/debmetaindex.cc')
-rw-r--r--apt-pkg/deb/debmetaindex.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index fef58f543..71e047257 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -528,7 +528,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro
AuthPossible = true;
std::string const StrDate = Section.FindS("Date");
- if (RFC1123StrToTime(StrDate.c_str(), Date) == false)
+ if (RFC1123StrToTime(StrDate, Date) == false)
{
_error->Warning( _("Invalid '%s' entry in Release file %s"), "Date", Filename.c_str());
Date = 0;
@@ -567,7 +567,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro
// if we have a Valid-Until header in the Release file, use it as default
if (StrValidUntil.empty() == false)
{
- if (RFC1123StrToTime(StrValidUntil.c_str(), ValidUntil) == false)
+ if (RFC1123StrToTime(StrValidUntil, ValidUntil) == false)
{
if (ErrorText != NULL)
strprintf(*ErrorText, _("Invalid '%s' entry in Release file %s"), "Valid-Until", Filename.c_str());