summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdoc_validate.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 46849243..a50e820b 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1095,22 +1095,23 @@ post_bl_head(POST_ARGS)
{
int i;
const struct mdoc_node *n;
+ const struct mdoc_argv *a;
n = mdoc->last->parent;
assert(n->args);
- for (i = 0; i < (int)n->args->argc; i++)
- if (n->args->argv[i].arg == MDOC_Column)
- break;
-
- if (i == (int)n->args->argc && n->nchild)
- return(warn_count(mdoc, "==", 0,
- "line arguments", n->nchild));
-
- if (n->args->argv[i].sz && mdoc->last->child)
- return(mdoc_nerr(mdoc, n, ECOLMIS));
+ for (i = 0; i < (int)n->args->argc; i++) {
+ a = &n->args->argv[i];
+ if (a->arg == MDOC_Column) {
+ if (a->sz && mdoc->last->nchild)
+ return(mdoc_nerr(mdoc, n, ECOLMIS));
+ return(1);
+ }
+ }
- return(1);
+ if (0 == (i = mdoc->last->nchild))
+ return(1);
+ return(warn_count(mdoc, "==", 0, "line arguments", i));
}