summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-11-18 11:13:30 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-11-18 11:13:30 +0000
commitcefbe26acfca0ede20a41f1c381176d6f2b5b8a0 (patch)
treec666a8e16940cd591a356b73c9d19cb0823208e7
parent2665f146c5250f8972d562a368b21e4f6350f4df (diff)
downloadpcre-cefbe26acfca0ede20a41f1c381176d6f2b5b8a0.tar.gz
Code tidies.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@751 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog2
-rw-r--r--pcre_compile.c3
-rw-r--r--pcre_exec.c4
3 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 890de84..fda0d09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -41,6 +41,8 @@ Version 8.21
one behaved incorrectly. For example, (A){2,}+ behaved as if it was
(A)(A)++ which meant that, after a subsequent mismatch, backtracking into
the first (A) could occur when it should not.
+
+10. Add a cast and remove a redundant test from the code.
Version 8.20 21-Oct-2011
diff --git a/pcre_compile.c b/pcre_compile.c
index 10c136b..45705ca 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -3352,7 +3352,8 @@ for (;; ptr++)
}
*lengthptr += (int)(code - last_code);
- DPRINTF(("length=%d added %d c=%c\n", *lengthptr, code - last_code, c));
+ DPRINTF(("length=%d added %d c=%c\n", *lengthptr, (int)(code - last_code),
+ c));
/* If "previous" is set and it is not at the start of the work space, move
it back to there, in order to avoid filling up the work space. Otherwise,
diff --git a/pcre_exec.c b/pcre_exec.c
index 49189fb..9f31567 100644
--- a/pcre_exec.c
+++ b/pcre_exec.c
@@ -1253,14 +1253,14 @@ for (;;)
else
{
int recno = GET2(ecode, LINK_SIZE + 2); /* Recursion group number*/
- condition = (recno == RREF_ANY || recno == md->recursive->group_num);
+ condition = (recno == RREF_ANY || recno == md->recursive->group_num);
/* If the test is for recursion into a specific subpattern, and it is
false, but the test was set up by name, scan the table to see if the
name refers to any other numbers, and test them. The condition is true
if any one is set. */
- if (!condition && condcode == OP_NRREF && recno != RREF_ANY)
+ if (!condition && condcode == OP_NRREF)
{
uschar *slotA = md->name_table;
for (i = 0; i < md->name_count; i++)