This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexec.c: Stack ternary operator for readability
authorKarl Williamson <khw@cpan.org>
Thu, 31 Jul 2014 03:49:03 +0000 (21:49 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 22 Jan 2015 05:47:28 +0000 (22:47 -0700)
regexec.c

index f51517f..4919c15 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -4712,8 +4712,9 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
                 *      byte is never mistakable for ASCII, and so the test
                 *      will say it is not a word character, which is the
                 *      correct answer. */
-               ln = (locinput != reginfo->strbeg) ?
-                   UCHARAT(locinput - 1) : '\n';
+               ln = (locinput != reginfo->strbeg)
+                     ? UCHARAT(locinput - 1)
+                     : '\n';
                switch (FLAGS(scan)) {
                    case REGEX_UNICODE_CHARSET:
                        ln = isWORDCHAR_L1(ln);