From: Craig A. Berry <craigberry@mac.com>
Date: Mon, 31 Dec 2007 23:44:35 +0000 (+0000)
Subject: Fix VMS::Stdio bug introduced in 32713.
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b9893e571ac0b667e330dd75c20bb498b61c4750;p=p5sagit%2Fp5-mst-13.2.git

Fix VMS::Stdio bug introduced in 32713.

p4raw-id: //depot/perl@32791
---

diff --git a/vms/ext/Stdio/Stdio.xs b/vms/ext/Stdio/Stdio.xs
index e92b0fd..c50bacb 100644
--- a/vms/ext/Stdio/Stdio.xs
+++ b/vms/ext/Stdio/Stdio.xs
@@ -349,7 +349,7 @@ vmsopen(spec,...)
 	        fp = fopen(spec,mode,args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7]);
 	        break;
 	    }
-           if (!fp) {
+	    if (fp != NULL) {
              pio_fp = PerlIO_fdopen(fileno(fp),mode);
              fh = newFH(pio_fp,(mode[1] ? '+' : (mode[0] == 'r' ? '<' : (mode[0] == 'a' ? 'a' : '>'))));
 	     ST(0) = (fh ? sv_2mortal(fh) : &PL_sv_undef);