From f7f0d6c7560a8f71707e7852a512469147aa9f84 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 11 Aug 2011 20:53:28 +0200 Subject: cppcheck complains about some possible speed improvements which could be done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types. --- methods/ftp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'methods/ftp.cc') diff --git a/methods/ftp.cc b/methods/ftp.cc index 97248f900..c2c485769 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -559,7 +559,7 @@ bool FTPConn::ExtGoPasv() string::const_iterator List[4]; unsigned Count = 0; Pos++; - for (string::const_iterator I = Msg.begin() + Pos; I < Msg.end(); I++) + for (string::const_iterator I = Msg.begin() + Pos; I < Msg.end(); ++I) { if (*I != Msg[Pos]) continue; -- cgit v1.2.3 From f5a34606b4a910e7b7b984940fb2d12681a2dd3b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 11 Aug 2011 23:30:09 +0200 Subject: follow the recommendation of cppcheck to make some method methods (scnr) const and initial mostly Debug member values in the constructors --- methods/ftp.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'methods/ftp.cc') diff --git a/methods/ftp.cc b/methods/ftp.cc index c2c485769..eb7fedd85 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -69,7 +69,8 @@ time_t FtpMethod::FailTime = 0; // --------------------------------------------------------------------- /* */ FTPConn::FTPConn(URI Srv) : Len(0), ServerFd(-1), DataFd(-1), - DataListenFd(-1), ServerName(Srv) + DataListenFd(-1), ServerName(Srv), + ForceExtended(false), TryPassive(true) { Debug = _config->FindB("Debug::Acquire::Ftp",false); PasvAddr = 0; -- cgit v1.2.3