diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-01-10 05:53:19 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-01-12 13:52:05 -0800 |
commit | 8de90695ebca09be55363851efd41433f9eaac50 (patch) | |
tree | 8b5a359615496b95283bdb7ebb0f4f85d40b74ac /pp_ctl.c | |
parent | 535e48ea19f4d8f568f8581284e630b9a1f38c43 (diff) | |
download | perl-8de90695ebca09be55363851efd41433f9eaac50.tar.gz |
pp_ctl.c:pp_require: Remove redundant VMS null checks
SvPVX(newSVpv("",...)) should never return null.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -3671,9 +3671,7 @@ PP(pp_require) STRLEN unixlen; #ifdef VMS int vms_unixname = 0; - char *unixnamebuf; char *unixdir; - char *unixdirbuf; #endif const char *tryname = NULL; SV *namesv = NULL; @@ -3768,8 +3766,9 @@ PP(pp_require) * name can be translated to UNIX. */ - if ((unixnamebuf = SvPVX(sv_2mortal(newSVpv("", VMS_MAXRSS-1)))) - && (unixname = tounixspec(name, unixnamebuf)) != NULL) { + if ((unixname = + tounixspec(name, SvPVX(sv_2mortal(newSVpv("", VMS_MAXRSS-1))))) + != NULL) { unixlen = strlen(unixname); vms_unixname = 1; } @@ -3960,8 +3959,9 @@ PP(pp_require) if (!IS_SAFE_SYSCALL(dir, dirlen, "@INC entry", "require")) continue; #ifdef VMS - if (((unixdirbuf = SvPVX(sv_2mortal(newSVpv("", VMS_MAXRSS-1)))) == NULL) - || ((unixdir = tounixpath(dir, unixdirbuf)) == NULL)) + if ((unixdir = + tounixpath(dir, SvPVX(sv_2mortal(newSVpv("", VMS_MAXRSS-1))))) + == NULL) continue; sv_setpv(namesv, unixdir); sv_catpv(namesv, unixname); |