Skip to content

Commit 0bd5c1a

Browse files
committed
scan_num: Remove redundant variable
It turns out that the removed variable was set if and only if another one is set.
1 parent 88f287a commit 0bd5c1a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

toke.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12477,7 +12477,6 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp)
1247712477
* which will probably mean horrible loss of precision due to
1247812478
* multiple fp operations. */
1247912479
bool hexfp = FALSE;
12480-
int total_bits = 0;
1248112480
int significant_bits = 0;
1248212481
#if NVSIZE == 8 && defined(HAS_QUAD) && defined(Uquad_t)
1248312482
# define HEXFP_UQUAD
@@ -12616,8 +12615,6 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp)
1261612615
assert(shift >= 0);
1261712616
x = u << shift; /* make room for the digit */
1261812617

12619-
total_bits += shift;
12620-
1262112618
if ((x >> shift) != u
1262212619
&& !(PL_hints & HINT_NEW_BINARY)) {
1262312620
overflowed = TRUE;
@@ -12755,8 +12752,9 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp)
1275512752
}
1275612753
}
1275712754

12758-
if ((total_bits > 0 || significant_bits > 0) &&
12759-
isALPHA_FOLD_EQ(*h, 'p')) {
12755+
if ( (has_digs || significant_bits > 0)
12756+
&& isALPHA_FOLD_EQ(*h, 'p'))
12757+
{
1276012758
bool negexp = FALSE;
1276112759
h++;
1276212760
if (*h == '+')

0 commit comments

Comments
 (0)