summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters.nicoh.com>1996-01-02 03:32:50 +0000
committerAndy Dougherty <doughera.lafayette.edu>1996-01-02 03:32:50 +0000
commitfd0af264cfc969f4623f421719ccd55177a389c6 (patch)
tree86d004e14ed9df3d6dae7e8b02065d7b45bdb1ac
parent402d0d99d5ca19d17ad27a556bfca2662b27899e (diff)
downloadperl-fd0af264cfc969f4623f421719ccd55177a389c6.tar.gz
VMS changes ?
-rw-r--r--pp_sys.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pp_sys.c b/pp_sys.c
index d7a6574a1c..d80449ed3e 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3252,7 +3252,8 @@ PP(pp_ghostent)
PUSHs(sv = sv_newmortal());
if (hent) {
if (which == OP_GHBYNAME) {
- sv_setpvn(sv, hent->h_addr, hent->h_length);
+ if (hent->h_addr)
+ sv_setpvn(sv, hent->h_addr, hent->h_length);
}
else
sv_setpv(sv, (char*)hent->h_name);
@@ -3281,7 +3282,8 @@ PP(pp_ghostent)
}
#else
PUSHs(sv = sv_mortalcopy(&sv_no));
- sv_setpvn(sv, hent->h_addr, len);
+ if (hent->h_addr)
+ sv_setpvn(sv, hent->h_addr, len);
#endif /* h_addr */
}
RETURN;