diff options
author | 2018-12-31 04:55:42 +0000 | |
---|---|---|
committer | 2018-12-31 04:55:42 +0000 | |
commit | 83d65a5a1d86e881d4ff0eecde80e9fbb01a7d35 (patch) | |
tree | c342f04814fc90f377e9652f6a7a7df11cb0dbcb /usr.bin/mandoc/man_validate.c | |
parent | mention -mretpoline by default on amd64 (diff) | |
download | wireguard-openbsd-83d65a5a1d86e881d4ff0eecde80e9fbb01a7d35.tar.xz wireguard-openbsd-83d65a5a1d86e881d4ff0eecde80e9fbb01a7d35.zip |
Cleanup, minus 15 LOC, no functional change:
Simplify the way the man(7) and mdoc(7) validators are called.
Reset the parser state with a common function before calling them.
There is no need to again reset the parser state afterwards,
the parsers are no longer used after validation.
This allows getting rid of man_node_validate() and mdoc_node_validate()
as separate functions.
Diffstat (limited to 'usr.bin/mandoc/man_validate.c')
-rw-r--r-- | usr.bin/mandoc/man_validate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c index 4f176e127fc..bdc2aadd2b7 100644 --- a/usr.bin/mandoc/man_validate.c +++ b/usr.bin/mandoc/man_validate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man_validate.c,v 1.112 2018/12/14 05:17:45 schwarze Exp $ */ +/* $OpenBSD: man_validate.c,v 1.113 2018/12/31 04:55:42 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012-2018 Ingo Schwarze <schwarze@openbsd.org> @@ -99,7 +99,7 @@ static const v_check man_valids[MAN_MAX - MAN_TH] = { /* Validate the subtree rooted at man->last. */ void -man_node_validate(struct roff_man *man) +man_validate(struct roff_man *man) { struct roff_node *n; const v_check *cp; @@ -126,7 +126,7 @@ man_node_validate(struct roff_man *man) man->last = man->last->child; while (man->last != NULL) { - man_node_validate(man); + man_validate(man); if (man->last == n) man->last = man->last->child; else |