From: Father Chrysostomos Date: Fri, 29 Nov 2013 00:05:30 +0000 (-0800) Subject: Revert part of 2efab60d9 X-Git-Tag: upstream/5.20.0~1093 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1534c6f5c3ecc70066a03d0b7df074bcd2e6f48c;p=platform%2Fupstream%2Fperl.git Revert part of 2efab60d9 As Karl Williamson pointed out in <5296C04E.10103@khwilliamson.com>, sv_setpv will do SvOK_off if Strerror returns null, so this SvOK check is not redundant. --- diff --git a/mg.c b/mg.c index 3f6eb2c..4b1deaf 100644 --- a/mg.c +++ b/mg.c @@ -849,7 +849,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) sv_setnv(sv, (NV)Perl_rc); sv_setpv(sv, os2error(Perl_rc)); } - if (strNE(SvPVX(sv), "")) { + if (SvOK(sv) && strNE(SvPVX(sv), "")) { fixup_errno_string(sv); } # elif defined(WIN32)