Skip to content

Commit 02ae424

Browse files
committed
S_scan_ident: Remove unnecessary complexity
This check that the code just below won't look beyond the end of the buffer, is rendered redundant by the "_safe" macro which does the check itself.
1 parent 26e7ae0 commit 02ae424

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

toke.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10852,7 +10852,7 @@ S_scan_ident(pTHX_ char *s, char *dest, char *dest_end, U32 flags)
1085210852
* encoded in UTF-8 or not, we can use the foo_A macros below and '\0' and
1085310853
* '{' without knowing if is UTF-8 or not. */
1085410854

10855-
if ( (s <= PL_bufend - ((is_utf8) ? UTF8SKIP(s) : 1))
10855+
if ( s < PL_bufend
1085610856
&& ( isGRAPH_A(*s)
1085710857
|| (is_utf8 ? isIDFIRST_utf8_safe(s, PL_bufend)
1085810858
: (isGRAPH_L1(*s) && LIKELY((U8) *s != SHY_NATIVE)))))

0 commit comments

Comments
 (0)