From 3ced8e028be794d28ae0b1669df2f109ff011bf0 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 2 Feb 2015 04:26:44 +0000 Subject: 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. --- mdoc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mdoc.c') 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 * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze @@ -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 * -- cgit v1.2.3