=================================================================== RCS file: /cvs/mandoc/tbl_layout.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -p -r1.35 -r1.36 --- mandoc/tbl_layout.c 2015/01/30 00:29:30 1.35 +++ mandoc/tbl_layout.c 2015/01/30 02:09:04 1.36 @@ -1,4 +1,4 @@ -/* $Id: tbl_layout.c,v 1.35 2015/01/30 00:29:30 schwarze Exp $ */ +/* $Id: tbl_layout.c,v 1.36 2015/01/30 02:09:04 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012, 2014, 2015 Ingo Schwarze @@ -326,9 +326,9 @@ cell_alloc(struct tbl_node *tbl, struct tbl_row *rp, e struct tbl_cell *p, *pp; struct tbl_head *h, *hp; - p = mandoc_calloc(1, sizeof(struct tbl_cell)); + p = mandoc_calloc(1, sizeof(*p)); - if (NULL != (pp = rp->last)) { + if ((pp = rp->last) != NULL) { pp->next = p; h = pp->head->next; } else { @@ -341,15 +341,15 @@ cell_alloc(struct tbl_node *tbl, struct tbl_row *rp, e /* Re-use header. */ - if (h) { + if (h != NULL) { p->head = h; return(p); } - hp = mandoc_calloc(1, sizeof(struct tbl_head)); + hp = mandoc_calloc(1, sizeof(*hp)); hp->ident = tbl->opts.cols++; - if (tbl->last_head) { + if (tbl->last_head != NULL) { hp->prev = tbl->last_head; tbl->last_head->next = hp; } else