summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-03-23 12:11:18 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-03-23 12:11:18 +0000
commit889e182fcac9bd2312f07782277ab1e832f9bb75 (patch)
treeef250a703f800ff0d1343e6e88415733a430a57b /roff.c
parentac1f227ddd1d860957c848f834ec0dfbe0dbbe83 (diff)
downloadmandoc-889e182fcac9bd2312f07782277ab1e832f9bb75.tar.gz
avoid repetitive code for asprintf error handling
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/roff.c b/roff.c
index ee025cbb..2376d3cf 100644
--- a/roff.c
+++ b/roff.c
@@ -656,11 +656,7 @@ roff_parsetext(char **bufp, size_t *szp, int pos, int *offs)
/* Spring the input line trap. */
if (1 == roffit_lines) {
- isz = asprintf(&p, "%s\n.%s", *bufp, roffit_macro);
- if (-1 == isz) {
- perror(NULL);
- exit((int)MANDOCLEVEL_SYSERR);
- }
+ isz = mandoc_asprintf(&p, "%s\n.%s", *bufp, roffit_macro);
free(*bufp);
*bufp = p;
*szp = isz + 1;