diff options
Diffstat (limited to 'methods')
-rw-r--r-- | methods/basehttp.cc | 14 | ||||
-rw-r--r-- | methods/cdrom.cc | 2 | ||||
-rw-r--r-- | methods/connect.cc | 2 | ||||
-rw-r--r-- | methods/file.cc | 2 | ||||
-rw-r--r-- | methods/ftp.cc | 6 | ||||
-rw-r--r-- | methods/gpgv.cc | 2 | ||||
-rw-r--r-- | methods/http.cc | 2 | ||||
-rw-r--r-- | methods/mirror.cc | 2 | ||||
-rw-r--r-- | methods/rred.cc | 2 | ||||
-rw-r--r-- | methods/rsh.cc | 2 | ||||
-rw-r--r-- | methods/store.cc | 2 |
11 files changed, 19 insertions, 19 deletions
diff --git a/methods/basehttp.cc b/methods/basehttp.cc index f8dd7c020..04c194ad9 100644 --- a/methods/basehttp.cc +++ b/methods/basehttp.cc @@ -313,7 +313,7 @@ BaseHttpMethod::DealWithHeaders(FetchResult &Res, RequestState &Req) ; else if (Req.Location[0] == '/' && Queue->Uri.empty() == false) { - URI Uri = Queue->Uri; + URI Uri(Queue->Uri); if (Uri.Host.empty() == false) NextURI = URI::SiteOnly(Uri); else @@ -332,7 +332,7 @@ BaseHttpMethod::DealWithHeaders(FetchResult &Res, RequestState &Req) else { NextURI = DeQuoteString(Req.Location); - URI tmpURI = NextURI; + URI tmpURI(NextURI); if (tmpURI.Access.find('+') != std::string::npos) { _error->Error("Server tried to trick us into using a specific implementation: %s", tmpURI.Access.c_str()); @@ -340,7 +340,7 @@ BaseHttpMethod::DealWithHeaders(FetchResult &Res, RequestState &Req) return ERROR_WITH_CONTENT_PAGE; return ERROR_UNRECOVERABLE; } - URI Uri = Queue->Uri; + URI Uri(Queue->Uri); if (Binary.find('+') != std::string::npos) { auto base = Binary.substr(0, Binary.find('+')); @@ -493,7 +493,7 @@ bool BaseHttpMethod::Fetch(FetchItem *) do { // Make sure we stick with the same server - if (Server->Comp(QueueBack->Uri) == false) + if (Server->Comp(URI(QueueBack->Uri)) == false) break; bool const UsableHashes = QueueBack->ExpectedHashes.usable(); @@ -578,14 +578,14 @@ int BaseHttpMethod::Loop() continue; // Connect to the server - if (Server == 0 || Server->Comp(Queue->Uri) == false) + if (Server == 0 || Server->Comp(URI(Queue->Uri)) == false) { if (!Queue->Proxy().empty()) { - URI uri = Queue->Uri; + URI uri(Queue->Uri); _config->Set("Acquire::" + uri.Access + "::proxy::" + uri.Host, Queue->Proxy()); } - Server = CreateServerState(Queue->Uri); + Server = CreateServerState(URI(Queue->Uri)); setPostfixForMethodNames(::URI(Queue->Uri).Host.c_str()); AllowRedirect = ConfigFindB("AllowRedirect", true); PipelineDepth = ConfigFindI("Pipeline-Depth", 10); diff --git a/methods/cdrom.cc b/methods/cdrom.cc index 77270b09f..d024d18d1 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -175,7 +175,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm) { FetchResult Res; - URI Get = Itm->Uri; + URI Get(Itm->Uri); string File = Get.Path; Debug = DebugEnabled(); diff --git a/methods/connect.cc b/methods/connect.cc index 1d6f8919d..61968efe0 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -262,7 +262,7 @@ static std::vector<struct addrinfo *> OrderAddresses(struct addrinfo *CurHost) allAddrs.push_back(*otherIter++); } - return std::move(allAddrs); + return allAddrs; } /*}}}*/ // Check for errors and report them /*{{{*/ diff --git a/methods/file.cc b/methods/file.cc index ff4301576..9f4e713b8 100644 --- a/methods/file.cc +++ b/methods/file.cc @@ -43,7 +43,7 @@ class FileMethod : public aptMethod /* */ bool FileMethod::Fetch(FetchItem *Itm) { - URI Get = Itm->Uri; + URI Get(Itm->Uri); std::string File = Get.Path; FetchResult Res; if (Get.Host.empty() == false) diff --git a/methods/ftp.cc b/methods/ftp.cc index 8213f1b50..98398341e 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -1037,7 +1037,7 @@ bool FtpMethod::Configuration(string Message) /* Fetch a single file, called by the base class.. */ bool FtpMethod::Fetch(FetchItem *Itm) { - URI Get = Itm->Uri; + URI Get(Itm->Uri); const char *File = Get.Path.c_str(); FetchResult Res; Res.Filename = Itm->DestFile; @@ -1166,8 +1166,8 @@ int main(int, const char *argv[]) proxy urls */ if (getenv("ftp_proxy") != 0) { - URI Proxy = string(getenv("ftp_proxy")); - + URI Proxy(string(getenv("ftp_proxy"))); + // Run the HTTP method if (Proxy.Access == "http") { diff --git a/methods/gpgv.cc b/methods/gpgv.cc index f66e3356f..04a4f6a83 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -419,7 +419,7 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, bool GPGVMethod::URIAcquire(std::string const &Message, FetchItem *Itm) { - URI const Get = Itm->Uri; + URI const Get(Itm->Uri); string const Path = Get.Host + Get.Path; // To account for relative paths SignersStorage Signers; diff --git a/methods/http.cc b/methods/http.cc index d75e9fe84..d3e16bba3 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -892,7 +892,7 @@ ResultState HttpServerState::Go(bool ToFile, RequestState &Req) /* This places the http request in the outbound buffer */ void HttpMethod::SendReq(FetchItem *Itm) { - URI Uri = Itm->Uri; + URI Uri(Itm->Uri); { auto const plus = Binary.find('+'); if (plus != std::string::npos) diff --git a/methods/mirror.cc b/methods/mirror.cc index add9f0875..dcf4cbd13 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -97,7 +97,7 @@ class MirrorMethod : public aptMethod /*{{{*/ void DealWithPendingItems(std::vector<std::string> const &baseuris, MirrorListInfo const &info, FetchItem *const Itm, std::function<void()> handler); public: - MirrorMethod(std::string &&pProg) : aptMethod(std::move(pProg), "2.0", SingleInstance | Pipeline | SendConfig | AuxRequests), genrng(clock()) + explicit MirrorMethod(std::string &&pProg) : aptMethod(std::move(pProg), "2.0", SingleInstance | Pipeline | SendConfig | AuxRequests), genrng(clock()) { SeccompFlags = aptMethod::BASE | aptMethod::DIRECTORY; } diff --git a/methods/rred.cc b/methods/rred.cc index d4cf1050d..949fa4773 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -574,7 +574,7 @@ class RredMethod : public aptMethod { protected: virtual bool URIAcquire(std::string const &Message, FetchItem *Itm) APT_OVERRIDE { Debug = DebugEnabled(); - URI Get = Itm->Uri; + URI Get(Itm->Uri); std::string Path = Get.Host + Get.Path; // rred:/path - no host FetchResult Res; diff --git a/methods/rsh.cc b/methods/rsh.cc index 0da18690b..5c08959c6 100644 --- a/methods/rsh.cc +++ b/methods/rsh.cc @@ -433,7 +433,7 @@ void RSHMethod::SigTerm(int) /* */ bool RSHMethod::Fetch(FetchItem *Itm) { - URI Get = Itm->Uri; + URI Get(Itm->Uri); const char *File = Get.Path.c_str(); FetchResult Res; Res.Filename = Itm->DestFile; diff --git a/methods/store.cc b/methods/store.cc index 7b9e202d9..1b0f07947 100644 --- a/methods/store.cc +++ b/methods/store.cc @@ -63,7 +63,7 @@ static bool OpenFileWithCompressorByName(FileFd &fileFd, std::string const &File /*}}}*/ bool StoreMethod::Fetch(FetchItem *Itm) /*{{{*/ { - URI Get = Itm->Uri; + URI Get(Itm->Uri); std::string Path = Get.Host + Get.Path; // To account for relative paths FetchResult Res; |