From: Father Chrysostomos Date: Fri, 10 Jan 2014 13:53:19 +0000 (-0800) Subject: pp_ctl.c:pp_require: Remove redundant VMS null checks X-Git-Tag: upstream/5.20.0~806 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8de90695ebca09be55363851efd41433f9eaac50;p=platform%2Fupstream%2Fperl.git pp_ctl.c:pp_require: Remove redundant VMS null checks SvPVX(newSVpv("",...)) should never return null. --- diff --git a/pp_ctl.c b/pp_ctl.c index fcfa3a1..2b7b3a9 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -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);