summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-12-17 17:40:44 +0000
committerNicholas Clark <nick@ccl4.org>2005-12-17 17:40:44 +0000
commitc81271c318db4fc452c901997c383f327c851326 (patch)
tree871a2a760738e375522217819950ded8fc443f25 /sv.c
parentf6f8a7cdd6331290b6b159b1c12c7587006cc48d (diff)
downloadperl-c81271c318db4fc452c901997c383f327c851326.tar.gz
Pull the definition of olderrno in sv_2pv_flags into the block where
it's used. p4raw-id: //depot/perl@26390
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index fbf7ed00c9..1418cf78e9 100644
--- a/sv.c
+++ b/sv.c
@@ -2350,7 +2350,6 @@ char *
Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags)
{
register char *s;
- int olderrno;
if (!sv) {
if (lp)
@@ -2509,11 +2508,12 @@ Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags)
SvIsUV_on(sv);
}
else if (SvNOKp(sv)) {
+ const int olderrno = errno;
if (SvTYPE(sv) < SVt_PVNV)
sv_upgrade(sv, SVt_PVNV);
/* The +20 is pure guesswork. Configure test needed. --jhi */
s = SvGROW_mutable(sv, NV_DIG + 20);
- olderrno = errno; /* some Xenix systems wipe out errno here */
+ /* some Xenix systems wipe out errno here */
#ifdef apollo
if (SvNVX(sv) == 0.0)
(void)strcpy(s,"0");