aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/eqn.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-10-10 14:02:02 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-10-10 14:02:02 +0000
commit3292acbca8501925e4e4f875c4d374be76a46f19 (patch)
tree323ac98c90f90fea81e21c9e1205175f31ffb095 /eqn.c
parentf50d4319685e3fbbff4c0871544a4aad054b35b3 (diff)
downloadmandoc-3292acbca8501925e4e4f875c4d374be76a46f19.tar.gz
mandoc-3292acbca8501925e4e4f875c4d374be76a46f19.tar.zst
mandoc-3292acbca8501925e4e4f875c4d374be76a46f19.zip
No need to assert() that a pointer is non-null right before dereferencing it.
The assert message contains no more information than the segfault.
Diffstat (limited to 'eqn.c')
-rw-r--r--eqn.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/eqn.c b/eqn.c
index fa65811e..fbbef811 100644
--- a/eqn.c
+++ b/eqn.c
@@ -1,4 +1,4 @@
-/* $Id: eqn.c,v 1.49 2014/10/10 09:12:44 kristaps Exp $ */
+/* $Id: eqn.c,v 1.50 2014/10/10 14:02:02 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -537,10 +537,7 @@ eqn_box_alloc(struct eqn_node *ep, struct eqn_box *parent)
bp->expectargs = UINT_MAX;
bp->size = ep->gsize;
- assert(NULL != parent);
-
if (NULL != parent->first) {
- assert(NULL != parent->last);
parent->last->next = bp;
bp->prev = parent->last;
} else