From: Yves Orton Date: Tue, 13 Jun 2006 09:39:42 +0000 (+0200) Subject: Guard clause should happen first, otherwise its not a guard clause. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=13a24baded0bcfd57a5060f46aead50d004b1374;p=p5sagit%2Fp5-mst-13.2.git Guard clause should happen first, otherwise its not a guard clause. Message-ID: <9b18b3110606130039v1c6a3fe6s448e92ab2a05888a@mail.gmail.com> p4raw-id: //depot/perl@28391 --- diff --git a/regcomp.c b/regcomp.c index a891c48..8ea1dc6 100644 --- a/regcomp.c +++ b/regcomp.c @@ -2012,6 +2012,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, SV *re_trie_maxbuff = NULL; GET_RE_DEBUG_FLAGS_DECL; +#ifdef DEBUGGING + StructCopy(&zero_scan_data, &data_fake, scan_data_t); +#endif while (scan && OP(scan) != END && scan < last) { /* Peephole optimizer: */ diff --git a/regexec.c b/regexec.c index a853b85..f93e17e 100644 --- a/regexec.c +++ b/regexec.c @@ -1603,7 +1603,7 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, points=(U8**)SvPV_nolen(sv_points ); if (trie->bitmap && trie_type != trie_utf8_fold) { - while (!TRIE_BITMAP_TEST(trie,*s) && s <= last_start ) { + while (s <= last_start && !TRIE_BITMAP_TEST(trie,*s) ) { s++; } } @@ -1716,7 +1716,7 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, if (leftmost) break; else if (!charid && trie->bitmap && trie_type != trie_utf8_fold) { - while (!TRIE_BITMAP_TEST(trie,*uc) && uc <= (U8*)last_start ) { + while ( uc <= (U8*)last_start && !TRIE_BITMAP_TEST(trie,*uc) ) { uc++; } }