summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@pobox.com>2008-11-26 15:01:41 -0800
committerSteve Hay <SteveHay@planit.com>2008-12-05 18:11:56 +0000
commit4ee3916907333148e2c880a1f5aeba348c349925 (patch)
treeba07e244427cccdd6ed01277665634498770058c /sv.c
parent33839f2f0661d0502f129769a85cfcf904354d39 (diff)
downloadperl-4ee3916907333148e2c880a1f5aeba348c349925.tar.gz
standardize save/restore of errno & vaxc$errno
Message-ID: <20081127070141.GD17663@tytlal.topaz.cx> p4raw-id: //depot/perl@35018
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 7d6c041a60..9fe0a3f70d 100644
--- a/sv.c
+++ b/sv.c
@@ -2958,7 +2958,7 @@ Perl_sv_2pv_flags(pTHX_ register SV *const sv, STRLEN *const lp, const I32 flags
*s = '\0';
}
else if (SvNOKp(sv)) {
- const int olderrno = errno;
+ dSAVE_ERRNO;
if (SvTYPE(sv) < SVt_PVNV)
sv_upgrade(sv, SVt_PVNV);
/* The +20 is pure guesswork. Configure test needed. --jhi */
@@ -2972,7 +2972,7 @@ Perl_sv_2pv_flags(pTHX_ register SV *const sv, STRLEN *const lp, const I32 flags
{
Gconvert(SvNVX(sv), NV_DIG, 0, s);
}
- errno = olderrno;
+ RESTORE_ERRNO;
#ifdef FIXNEGATIVEZERO
if (*s == '-' && s[1] == '0' && !s[2]) {
s[0] = '0';