summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-17 13:14:55 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-17 13:14:55 +0000
commitce3e5c451d1a009a73fa3a69c256b0fd8af3aa33 (patch)
treef0f4f8f84e8cdb6c3b7055e7158497558367ace7 /op.c
parentc2b7afd3c0b668fe31fd8835d487d6343bfcf526 (diff)
downloadperl-ce3e5c451d1a009a73fa3a69c256b0fd8af3aa33.tar.gz
Add assertions to cover cases where the Coverity scanner thinks we
could are deferencing a NULL pointer, but we think it missed something it should have been capable of figuring out. p4raw-id: //depot/perl@27867
Diffstat (limited to 'op.c')
-rw-r--r--op.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/op.c b/op.c
index 4b73d3f703..57e4a1b872 100644
--- a/op.c
+++ b/op.c
@@ -4384,7 +4384,9 @@ whileline, OP *expr, OP *block, OP *cont, I32 has_my)
cont = append_elem(OP_LINESEQ, cont, unstack);
}
+ assert(block);
listop = append_list(OP_LINESEQ, (LISTOP*)block, (LISTOP*)cont);
+ assert(listop);
redo = LINKLIST(listop);
if (expr) {
@@ -7171,6 +7173,7 @@ Perl_ck_split(pTHX_ OP *o)
if (!kid->op_sibling)
append_elem(OP_SPLIT, o, newSVOP(OP_CONST, 0, newSViv(0)));
+ assert(kid->op_sibling);
kid = kid->op_sibling;
scalar(kid);