]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/versionmatch.cc
do not redownload unchanged InRelease files
[apt.git] / apt-pkg / versionmatch.cc
index 6d667acade4e7a51fb1d442337b09918f2186c81..26262a010e7e62998621e2ec3826a1aa6807d9b6 100644 (file)
@@ -11,8 +11,9 @@
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
-#include <apt-pkg/versionmatch.h>
+#include<config.h>
 
+#include <apt-pkg/versionmatch.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/error.h>
 
 #include <fnmatch.h>
 #include <sys/types.h>
 #include <regex.h>
-
                                                                        /*}}}*/
 
+using std::string;
+
 // VersionMatch::pkgVersionMatch - Constructor                         /*{{{*/
 // ---------------------------------------------------------------------
 /* Break up the data string according to the selected type */
@@ -179,9 +181,9 @@ pkgCache::VerIterator pkgVersionMatch::Find(pkgCache::PkgIterator Pkg)
 bool pkgVersionMatch::ExpressionMatches(const char *pattern, const char *string)
 {
    if (pattern[0] == '/') {
-      bool res = false;
       size_t length = strlen(pattern);
       if (pattern[length - 1] == '/') {
+        bool res = false;
         regex_t preg;
         char *regex = strdup(pattern + 1);
         regex[length - 2] = '\0';