summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-02 04:26:44 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-02 04:26:44 +0000
commit5aa5efecc3c1ed935aac943e15689f4388db9bca (patch)
tree67ed1bdab37ed0d25bb60ac1d48a948dcb2b335d /mdoc.c
parent2a8721309f4f7dbbb5908c122a134490432f4431 (diff)
downloadmandoc-5aa5efecc3c1ed935aac943e15689f4388db9bca.tar.gz
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mdoc.c b/mdoc.c
index 5039a47d..9e7a1482 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -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 *