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:
Karl Williamson 2025-10-08 06:26:10 -06:00
parent 438e1f5814
commit 9abb9be73e

4
toke.c
View File

@ -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++;