diff options
author | 2010-07-02 17:41:05 +0000 | |
---|---|---|
committer | 2010-07-02 17:41:05 +0000 | |
commit | 9f37396282cd1757d44823673979e073fb45064c (patch) | |
tree | f0e04e03b7f14c7536a45eede9edc280e0d5fe5d | |
parent | Move common code for waking up writers on a tty into a function. (diff) | |
download | wireguard-openbsd-9f37396282cd1757d44823673979e073fb45064c.tar.xz wireguard-openbsd-9f37396282cd1757d44823673979e073fb45064c.zip |
Not only for -tag lists, but for -hang, -ohang, -inset, -diag,
and -item list as well, empty bodies are OK, they do not even
warrant a warning, much less the error they were throwing.
According to kristaps, joerg@ also brought this up some time ago.
ok kristaps@ jmc@
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 3fb8d30cb56..bdd143a3ff2 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.63 2010/06/27 21:54:42 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.64 2010/07/02 17:41:05 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -1067,9 +1067,6 @@ post_it(POST_ARGS) if (NULL == mdoc->last->head->child) if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOARGS)) return(0); - if (NULL == mdoc->last->body->child) - if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOBODY)) - return(0); break; case (LIST_bullet): /* FALLTHROUGH */ @@ -1078,14 +1075,14 @@ post_it(POST_ARGS) case (LIST_enum): /* FALLTHROUGH */ case (LIST_hyphen): + if (NULL == mdoc->last->body->child) + if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOBODY)) + return(0); /* FALLTHROUGH */ case (LIST_item): if (mdoc->last->head->child) if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_ARGSLOST)) return(0); - if (NULL == mdoc->last->body->child) - if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOBODY)) - return(0); break; case (LIST_column): cols = -1; |