diff options
author | Steve Peters <steve@fisharerojo.org> | 2005-11-05 14:49:11 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2005-11-05 14:49:11 +0000 |
commit | d9aa96a49c0aa1ba55eb980309a89c366d8f0c06 (patch) | |
tree | ffa07f044e07f84ee2973531299720552b742363 /pp_hot.c | |
parent | 554a9ef59ec1a9e668d5bfd558b8533fc3f06147 (diff) | |
download | perl-d9aa96a49c0aa1ba55eb980309a89c366d8f0c06.tar.gz |
Kill warnings and add a panic to pp_defined() in case the wrong op
is passed in.
p4raw-id: //depot/perl@26017
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -329,7 +329,7 @@ PP(pp_or) PP(pp_defined) { dSP; - register SV* sv; + register SV* sv = NULL; bool defined = FALSE; const int op_type = PL_op->op_type; @@ -344,7 +344,8 @@ PP(pp_defined) sv = POPs; if (!sv || !SvANY(sv)) RETPUSHNO; - } + } else + DIE(aTHX_ "panic: Invalid op passed to dd_defined()"); switch (SvTYPE(sv)) { case SVt_PVAV: @@ -371,11 +372,11 @@ PP(pp_defined) if(op_type == OP_DOR) --SP; RETURNOP(cLOGOP->op_other); - } else if (op_type == OP_DEFINED) { - if(defined) - RETPUSHYES; - RETPUSHNO; } + /* assuming OP_DEFINED */ + if(defined) + RETPUSHYES; + RETPUSHNO; } PP(pp_add) |