aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/main.c b/main.c
index 55e06617..0acc9c3a 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.312 2018/12/14 01:18:25 schwarze Exp $ */
+/* $Id: main.c,v 1.313 2018/12/14 05:18:02 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -889,7 +889,6 @@ check_xr(void)
static struct manpaths paths;
struct mansearch search;
struct mandoc_xr *xr;
- char *cp;
size_t sz;
if (paths.sz == 0)
@@ -908,12 +907,12 @@ check_xr(void)
if (fs_search(&search, &paths, 1, &xr->name, NULL, &sz))
continue;
if (xr->count == 1)
- mandoc_asprintf(&cp, "Xr %s %s", xr->name, xr->sec);
+ mandoc_msg(MANDOCERR_XR_BAD, xr->line,
+ xr->pos + 1, "Xr %s %s", xr->name, xr->sec);
else
- mandoc_asprintf(&cp, "Xr %s %s (%d times)",
+ mandoc_msg(MANDOCERR_XR_BAD, xr->line,
+ xr->pos + 1, "Xr %s %s (%d times)",
xr->name, xr->sec, xr->count);
- mandoc_msg(MANDOCERR_XR_BAD, NULL, xr->line, xr->pos + 1, cp);
- free(cp);
}
}