summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-04-03 17:06:20 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-04-03 17:06:20 +0000
commit148d5c4d2674e507ae720da1aa37065cf06a01db (patch)
tree3f348e964565391127b8fc5f47e3cd6b2dc31653 /usr.bin
parent999e6e59cb86afe151f320360d84929ecb6821d0 (diff)
no need to die from .Xr without arguments, we can just ignore it
ok deraadt@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/mdoc_html.c5
-rw-r--r--usr.bin/mandoc/mdoc_term.c7
-rw-r--r--usr.bin/mandoc/mdoc_validate.c4
3 files changed, 11 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c
index ab1250ee032..fad95b2d99c 100644
--- a/usr.bin/mandoc/mdoc_html.c
+++ b/usr.bin/mandoc/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.8 2010/03/02 00:38:59 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.9 2010/04/03 17:06:19 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -753,6 +753,9 @@ mdoc_xr_pre(MDOC_ARGS)
struct htmlpair tag[2];
const struct mdoc_node *nn;
+ if (NULL == n->child)
+ return(0);
+
PAIR_CLASS_INIT(&tag[0], "link-man");
if (h->base_man) {
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index 438853ecae4..d4d3de5a407 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.71 2010/03/26 01:22:05 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.72 2010/04/03 17:06:19 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -1275,7 +1275,10 @@ termp_xr_pre(DECL_ARGS)
{
const struct mdoc_node *nn;
- assert(n->child && MDOC_TEXT == n->child->type);
+ if (NULL == n->child)
+ return(0);
+
+ assert(MDOC_TEXT == n->child->type);
nn = n->child;
term_word(p, nn->string);
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c
index 45792ce5968..7bb7b0b2fe8 100644
--- a/usr.bin/mandoc/mdoc_validate.c
+++ b/usr.bin/mandoc/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.46 2010/04/03 16:30:42 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.47 2010/04/03 17:06:19 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -129,7 +129,7 @@ static v_post posts_text1[] = { eerr_eq1, NULL };
static v_post posts_vt[] = { post_vt, NULL };
static v_post posts_wline[] = { bwarn_ge1, herr_eq0, NULL };
static v_post posts_wtext[] = { ewarn_ge1, NULL };
-static v_post posts_xr[] = { eerr_ge1, NULL };
+static v_post posts_xr[] = { ewarn_ge1, NULL };
static v_pre pres_an[] = { pre_an, NULL };
static v_pre pres_bd[] = { pre_display, pre_bd, NULL };
static v_pre pres_bl[] = { pre_bl, NULL };