Skip to content

Commit

Permalink
vutil.c: Clean up white space
Browse files Browse the repository at this point in the history
Change tabs to blanks; Fix indentation; chomp trailing white space

Remove some blank lines that don't contribute to readability
  • Loading branch information
khwilliamson committed Jan 31, 2023
1 parent 81645b5 commit 0c26352
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions t/porting/customized.dat
Expand Up @@ -31,3 +31,4 @@ libnet cpan/libnet/lib/Net/POP3.pm 55a74121d7e6a122f63a12cec945777f6b8aa80b
libnet cpan/libnet/lib/Net/SMTP.pm 33efbd55e75486fe8201f9c63cf3f0704310a7b6
libnet cpan/libnet/lib/Net/Time.pm 3c86cd4d4db9ae207070d2e54f4d523b9ad58230
version cpan/version/lib/version.pm a963b513cf812bd7f4d28b3422efd9904e70a34c
version vutil.c 88855f7eb6ce443f57565d287ff2a0bbcd443bd2
15 changes: 6 additions & 9 deletions vutil.c
Expand Up @@ -582,7 +582,8 @@ Perl_upg_version(pTHX_ SV *ver, bool qv)
PERL_ARGS_ASSERT_UPG_VERSION;

if ( (SvUOK(ver) && SvUVX(ver) > VERSION_MAX)
|| (SvIOK(ver) && SvIVX(ver) > VERSION_MAX) ) {
|| (SvIOK(ver) && SvIVX(ver) > VERSION_MAX) )
{
/* out of bounds [unsigned] integer */
STRLEN len;
char tbuf[64];
Expand Down Expand Up @@ -670,8 +671,8 @@ Perl_upg_version(pTHX_ SV *ver, bool qv)
else { /* This value indicates to the restore code that we
didn't change the locale */
locale_name_on_entry = NULL;
}
}
}
}
else if (locale_obj_on_entry == PL_underlying_numeric_obj) {
/* Here, the locale appears to have been changed to use the
* program's underlying locale. Just use our mechanisms to
Expand All @@ -690,19 +691,16 @@ Perl_upg_version(pTHX_ SV *ver, bool qv)
}

# endif

/* Prevent recursed calls from trying to change back */
LOCK_LC_NUMERIC_STANDARD();

#endif

if (sv) {
Perl_sv_setpvf(aTHX_ sv, "%.9" NVff, SvNVX(ver));
Perl_sv_setpvf(aTHX_ sv, "%.9" NVff, SvNVX(ver));
len = SvCUR(sv);
buf = SvPVX(sv);
}
else {
len = my_snprintf(tbuf, sizeof(tbuf), "%.9" NVff, SvNVX(ver));
len = my_snprintf(tbuf, sizeof(tbuf), "%.9" NVff, SvNVX(ver));
buf = tbuf;
}

Expand All @@ -718,7 +716,6 @@ Perl_upg_version(pTHX_ SV *ver, bool qv)
}

LC_NUMERIC_UNLOCK; /* End critical section */

# else

if (locale_name_on_entry) {
Expand Down

0 comments on commit 0c26352

Please sign in to comment.