summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-11-27 07:18:59 -0800
committerFather Chrysostomos <sprout@cpan.org>2013-11-27 16:58:15 -0800
commit2efab60d94be1ca94e3a5b26804d99d0402d0c44 (patch)
tree08a96bffb0c5ec27747c7a7231540d2810ab3b13 /mg.c
parent94b6d16add295859a5863841449cf533f57cf843 (diff)
downloadperl-2efab60d94be1ca94e3a5b26804d99d0402d0c44.tar.gz
mg.c: Remove redundant SvOK checks
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mg.c b/mg.c
index a4a5eeca53..3f6eb2cb9b 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 (SvOK(sv) && strNE(SvPVX(sv), "")) {
+ if (strNE(SvPVX(sv), "")) {
fixup_errno_string(sv);
}
# elif defined(WIN32)
@@ -858,9 +858,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
sv_setnv(sv, (NV)dwErr);
if (dwErr) {
PerlProc_GetOSError(sv, dwErr);
- if (SvOK(sv)) {
- fixup_errno_string(sv);
- }
+ fixup_errno_string(sv);
}
else
sv_setpvs(sv, "");