]> git.saurik.com Git - apt.git/commitdiff
Use _error->Warning() instead of writing to std::cerr.
authorJulian Andres Klode <jak@debian.org>
Mon, 28 Jun 2010 15:34:54 +0000 (17:34 +0200)
committerJulian Andres Klode <jak@debian.org>
Mon, 28 Jun 2010 15:34:54 +0000 (17:34 +0200)
apt-pkg/versionmatch.cc

index 65908f733a771c82ce556b778f20d75d1a73ca6d..a269338d6c86e116f4a8b9510bd0f18a78b5bbe4 100644 (file)
@@ -183,7 +183,7 @@ bool pkgVersionMatch::ExpressionMatches(const char *pattern, const char *string)
         char *regex = strdup(pattern + 1);
         regex[length - 2] = '\0';
         if (regcomp(&preg, regex, REG_EXTENDED | REG_ICASE) != 0) {
-           std::cerr << "E: Invalid regular expression: " << regex << "\n";
+           _error->Warning("Invalid regular expression: %s", regex);
         } else if (regexec(&preg, string, 0, NULL, 0) == 0) {
            res = true;
         }