summaryrefslogtreecommitdiff
path: root/apt-pkg/versionmatch.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2013-03-10 12:24:13 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2013-03-10 12:24:13 +0100
commit69c2ecbdc937e3c73fe67d3c9bce12a80d3ec7ec (patch)
treeb3b8f0753ebe2760ab8d97b0e9404ddbeef25a1b /apt-pkg/versionmatch.cc
parentfd6a8d0ddc14406bb6c0996b5bbaa95d6ccc1186 (diff)
various simple changes to fix cppcheck warnings
Diffstat (limited to 'apt-pkg/versionmatch.cc')
-rw-r--r--apt-pkg/versionmatch.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc
index e4fa0ea65..26262a010 100644
--- a/apt-pkg/versionmatch.cc
+++ b/apt-pkg/versionmatch.cc
@@ -181,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';