mirror of
https://github.com/Perl/perl5.git
synced 2026-01-27 01:44:43 +00:00
toke.c: Simplify two ternaries
I don't know why these required ternaries; perhaps a bug in a C89 compiler.
This commit is contained in:
parent
438e1f5814
commit
9abb9be73e
4
toke.c
4
toke.c
@ -10628,7 +10628,7 @@ S_scan_ident(pTHX_ char *s, char *dest, char *dest_end, bool chk_unary)
|
||||
if (isSPACE(*s) || !*s)
|
||||
s = skipspace(s);
|
||||
if (isDIGIT(*s)) { /* handle $0 and $1 $2 and $10 and etc */
|
||||
bool is_zero= *s == '0' ? TRUE : FALSE;
|
||||
bool is_zero = *s == '0';
|
||||
char *digit_start= d;
|
||||
*d++ = *s++;
|
||||
while (s < PL_bufend && isDIGIT(*s)) {
|
||||
@ -10720,7 +10720,7 @@ S_scan_ident(pTHX_ char *s, char *dest, char *dest_end, bool chk_unary)
|
||||
|
||||
/* special case to handle ${10}, ${11} the same way we handle $1 etc */
|
||||
if (isDIGIT(*d)) {
|
||||
bool is_zero= *d == '0' ? TRUE : FALSE;
|
||||
bool is_zero = *d == '0';
|
||||
char *digit_start= d;
|
||||
while (s < PL_bufend && isDIGIT(*s)) {
|
||||
d++;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user