Skip to content

Commit 6277357

Browse files
committed
Code adjustment for a goto that bypassed a block initialization (though it was not relevant in the goto case)
1 parent 88fabd8 commit 6277357

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ pcre2test), avoid the use of a variable called "not" because that's deprecated
6363
in C and forbidden in C++. Also rewrite some code to avoid a goto into a block
6464
that bypassed its initialization (though it didn't actually matter).
6565

66+
15. More minor code adjustments to avoid using reserved C++ words as variable
67+
names ("new" and "typename") and another jump that bypassed an (irrelevant)
68+
initialization.
69+
6670

6771
Version 10.42 11-December-2022
6872
------------------------------

src/pcre2_compile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,8 @@ PRIV(check_escape)(PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, uint32_t *chptr,
15111511
compile_block *cb)
15121512
{
15131513
BOOL utf = (options & PCRE2_UTF) != 0;
1514+
BOOL alt_bsux =
1515+
((options & PCRE2_ALT_BSUX) | (xoptions & PCRE2_EXTRA_ALT_BSUX)) != 0;
15141516
PCRE2_SPTR ptr = *ptrptr;
15151517
uint32_t c, cc;
15161518
int escape = 0;
@@ -1607,8 +1609,6 @@ else
16071609
int s;
16081610
PCRE2_SPTR oldptr;
16091611
BOOL overflow;
1610-
BOOL alt_bsux =
1611-
((options & PCRE2_ALT_BSUX) | (xoptions & PCRE2_EXTRA_ALT_BSUX)) != 0;
16121612

16131613
/* Filter calls from pcre2_substitute(). */
16141614

0 commit comments

Comments
 (0)