]> git.saurik.com Git - apt.git/blobdiff - methods/ftp.cc
cppcheck complains about some possible speed improvements which could be
[apt.git] / methods / ftp.cc
index eb398666f322bccd6eca2dde1287299f5b304efa..c2c4857697e09a4296d26b538986eea82872bb2f 100644 (file)
@@ -19,6 +19,7 @@
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
+#include <apt-pkg/netrc.h>
 
 #include <sys/stat.h>
 #include <sys/time.h>
 
 #include <sys/stat.h>
 #include <sys/time.h>
@@ -558,7 +559,7 @@ bool FTPConn::ExtGoPasv()
    string::const_iterator List[4];
    unsigned Count = 0;
    Pos++;
    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;
    {
       if (*I != Msg[Pos])
         continue;
@@ -660,8 +661,7 @@ bool FTPConn::ModTime(const char *Path, time_t &Time)
       return true;
    
    // Parse it
       return true;
    
    // Parse it
-   StrToTime(Msg,Time);
-   return true;
+   return FTPMDTMStrToTime(Msg.c_str(), Time);
 }
                                                                        /*}}}*/
 // FTPConn::CreateDataFd - Get a data connection                       /*{{{*/
 }
                                                                        /*}}}*/
 // FTPConn::CreateDataFd - Get a data connection                       /*{{{*/