summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-01-08 11:55:35 -0700
committerKarl Williamson <khw@cpan.org>2020-01-13 20:58:56 -0700
commitebf8304506d48718bdf8bc97bf83b30cd55696af (patch)
treee189b9ba6bc30cff6e175fc2a2045837246e3257 /numeric.c
parentcddf31e4f8731c53affd5a6a588cf4167e99c3f0 (diff)
downloadperl-ebf8304506d48718bdf8bc97bf83b30cd55696af.tar.gz
numeric.c: White-space only
Outdent code whose enclosing block was removed by the previous commit. A few other white space fixups.
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/numeric.c b/numeric.c
index 8d2df8785a..17fca764df 100644
--- a/numeric.c
+++ b/numeric.c
@@ -387,14 +387,14 @@ Perl_grok_bin_oct_hex(pTHX_ const char *start,
(khw suspects that adding a LIKELY() just above would do the
same thing) */
redo:
- if (LIKELY(value <= max_div)) {
- value = (value << shift) | XDIGIT_VALUE(*s);
- /* Note XDIGIT_VALUE() is branchless, works on binary
- * and octal as well, so can be used here, without
- * slowing those down */
- factor <<= shift;
- continue;
- }
+ if (LIKELY(value <= max_div)) {
+ value = (value << shift) | XDIGIT_VALUE(*s);
+ /* Note XDIGIT_VALUE() is branchless, works on binary
+ * and octal as well, so can be used here, without
+ * slowing those down */
+ factor <<= shift;
+ continue;
+ }
/* Bah. We are about to overflow. Instead, add the unoverflowed
* value to an NV that contains an approximation to the correct
@@ -422,6 +422,7 @@ Perl_grok_bin_oct_hex(pTHX_ const char *start,
}
continue;
}
+
if ( *s == '_'
&& len
&& allow_underscores
@@ -431,8 +432,9 @@ Perl_grok_bin_oct_hex(pTHX_ const char *start,
++s;
goto redo;
}
- if ( ! (*flags & PERL_SCAN_SILENT_ILLDIGIT)
- && ckWARN(WARN_DIGIT))
+
+ if ( ! (*flags & PERL_SCAN_SILENT_ILLDIGIT)
+ && ckWARN(WARN_DIGIT))
{
if (base != 8) {
Perl_warner(aTHX_ packWARN(WARN_DIGIT),
@@ -453,6 +455,7 @@ Perl_grok_bin_oct_hex(pTHX_ const char *start,
"Illegal octal digit '%c' ignored", *s);
}
}
+
break;
}
@@ -486,6 +489,7 @@ Perl_grok_bin_oct_hex(pTHX_ const char *start,
*flags = 0;
return value;
}
+
*flags = PERL_SCAN_GREATER_THAN_UV_MAX;
if (result)
*result = value_nv;