Make VMS::Filespec::vms_realname return undef instead of garbage
authorCraig A. Berry <craigberry@mac.com>
Thu, 29 Nov 2007 18:29:40 +0000 (18:29 +0000)
committerCraig A. Berry <craigberry@mac.com>
Thu, 29 Nov 2007 18:29:40 +0000 (18:29 +0000)
when it fails.

p4raw-id: //depot/perl@32556

vms/vms.c

index a45dee5..e81c045 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -13179,7 +13179,10 @@ mp_do_vms_realname(pTHX_ const char *filespec, char *outbuf,
     /* Fall back to fid_to_name */
 
     sts = vms_fid_to_name(outbuf, VMS_MAXRSS + 1, filespec);
-    if (sts == 0) {
+    if (sts != 0) {
+       return NULL;
+    }
+    else {
 
 
        /* Now need to trim the version off */