summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-04 03:59:07 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-04 03:59:07 +0000
commit9f538c0458a40ff03fab4dd6c72f8e1e0960f80a (patch)
tree60b3073a95a15882bbb6976459f6ff84089dc270 /doio.c
parentbb4eb8ef33fdf31b7c6163f2bc75bf012292f041 (diff)
downloadperl-9f538c0458a40ff03fab4dd6c72f8e1e0960f80a.tar.gz
avoid warnings from shmread() when given undefined variable
(from Tom Christiansen) p4raw-id: //depot/perl@5504
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index d818185c48..d0a770461e 100644
--- a/doio.c
+++ b/doio.c
@@ -1849,6 +1849,9 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp)
if (shm == (char *)-1) /* I hate System V IPC, I really do */
return -1;
if (optype == OP_SHMREAD) {
+ /* suppress warning when reading into undef var (tchrist 3/Mar/00) */
+ if (! SvOK(mstr))
+ sv_setpvn(mstr, "", 0);
SvPV_force(mstr, len);
mbuf = SvGROW(mstr, msize+1);