aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit3ced8e028be794d28ae0b1669df2f109ff011bf0 (patch)
treed43f9ccc55130d4d6875e8ae139658498dbd0b45 /mdoc.c
parentcaaf8f81fafbcaf6798f6a0a01404004699a25b3 (diff)
downloadmandoc-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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdoc.c b/mdoc.c
index 6c2f0be8..278e301e 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -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 *