[Pcre-svn] [160] code/trunk/src/pcre2_jit_compile.c: Move al…

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [160] code/trunk/src/pcre2_jit_compile.c: Move all offset initialization to one place.
Revision: 160
          http://www.exim.org/viewvc/pcre2?view=rev&revision=160
Author:   zherczeg
Date:     2014-11-25 09:06:27 +0000 (Tue, 25 Nov 2014)


Log Message:
-----------
Move all offset initialization to one place.

Modified Paths:
--------------
    code/trunk/src/pcre2_jit_compile.c


Modified: code/trunk/src/pcre2_jit_compile.c
===================================================================
--- code/trunk/src/pcre2_jit_compile.c    2014-11-24 15:31:28 UTC (rev 159)
+++ code/trunk/src/pcre2_jit_compile.c    2014-11-25 09:06:27 UTC (rev 160)
@@ -3603,6 +3603,8 @@
   }


 offsets[0] = -1;
+offsets[1] = -1;
+offsets[2] = -1;
 /* Scan forward. */
 for (i = 0; i < max; i++)
   if (ones[i] <= 2) {
@@ -3616,7 +3618,6 @@
 if (offsets[0] >= 0)
   {
   /* Scan backward. */
-  offsets[1] = -1;
   for (i = max - 1; i > offsets[0]; i--)
     if (ones[i] <= 2 && i != range_right)
       {
@@ -3628,7 +3629,6 @@
   if (offsets[1] == -1 && offsets[0] == 0 && range_right < 0)
     return FALSE;


-  offsets[2] = -1;
   /* We only search for a middle character if there is no range check. */
   if (offsets[1] >= 0 && range_right == -1)
     {