=================================================================== RCS file: /cvs/mandoc/man_html.c,v retrieving revision 1.122 retrieving revision 1.123 diff -u -p -r1.122 -r1.123 --- mandoc/man_html.c 2017/01/17 01:47:51 1.122 +++ mandoc/man_html.c 2017/01/17 15:32:44 1.123 @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.122 2017/01/17 01:47:51 schwarze Exp $ */ +/* $Id: man_html.c,v 1.123 2017/01/17 15:32:44 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze @@ -172,14 +172,13 @@ html_man(void *arg, const struct roff_man *man) static void print_man_head(MAN_ARGS) { + char *cp; print_gen_head(h); - assert(man->title); - assert(man->msec); - bufinit(h); - bufcat_fmt(h, "%s(%s)", man->title, man->msec); + mandoc_asprintf(&cp, "%s(%s)", man->title, man->msec); print_otag(h, TAG_TITLE, ""); - print_text(h, h->buf); + print_text(h, cp); + free(cp); } static void