diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-02 04:26:44 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-02 04:26:44 +0000 |
commit | 3ced8e028be794d28ae0b1669df2f109ff011bf0 (patch) | |
tree | d43f9ccc55130d4d6875e8ae139658498dbd0b45 /mdoc.c | |
parent | caaf8f81fafbcaf6798f6a0a01404004699a25b3 (diff) | |
download | mandoc-3ced8e028be794d28ae0b1669df2f109ff011bf0.tar.gz mandoc-3ced8e028be794d28ae0b1669df2f109ff011bf0.tar.zst mandoc-3ced8e028be794d28ae0b1669df2f109ff011bf0.zip |
Get rid of all calls to rew_sub() in blk_exp_close(); only ten calls
remain in other functions. As a bonus, this fixes an assertion failure
jsg@ found some time ago with afl (test case 982) and improves minor
details in error reporting.
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.234 2015/01/15 04:26:40 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.235 2015/02/02 04:26:44 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -414,7 +414,7 @@ mdoc_body_alloc(struct mdoc *mdoc, int line, int pos, enum mdoct tok) return(p); } -void +struct mdoc_node * mdoc_endbody_alloc(struct mdoc *mdoc, int line, int pos, enum mdoct tok, struct mdoc_node *body, enum mdoc_endbody end) { @@ -426,6 +426,7 @@ mdoc_endbody_alloc(struct mdoc *mdoc, int line, int pos, enum mdoct tok, p->end = end; node_append(mdoc, p); mdoc->next = MDOC_NEXT_SIBLING; + return(p); } struct mdoc_node * |