diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-10-10 14:02:02 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-10-10 14:02:02 +0000 |
commit | 3292acbca8501925e4e4f875c4d374be76a46f19 (patch) | |
tree | 323ac98c90f90fea81e21c9e1205175f31ffb095 /eqn.c | |
parent | f50d4319685e3fbbff4c0871544a4aad054b35b3 (diff) | |
download | mandoc-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.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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 |