From: Julian Andres Klode Date: Mon, 28 Jun 2010 15:34:54 +0000 (+0200) Subject: Use _error->Warning() instead of writing to std::cerr. X-Git-Tag: 0.8.0~9^2~27 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/4213f040ac8464d8826b64746c49c21c53a1ab12?hp=01934fb1fe79cddcc3cb4c79c99c3c30390fdef6 Use _error->Warning() instead of writing to std::cerr. --- diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc index 65908f733..a269338d6 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -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; }