diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-17 11:30:23 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-17 11:30:23 +0000 |
commit | b8834ed2b38344025a694c113bdc5c9247d8dc7e (patch) | |
tree | 43048b0e3e1a25b8e7392ddd5ca0f540934aa492 /mdoc_validate.c | |
parent | ff909bf468538a284ebc9c54861cd32cbd19251c (diff) | |
download | mandoc-b8834ed2b38344025a694c113bdc5c9247d8dc7e.tar.gz |
Clean-up in libmdoc: fix last checks for mdoc_*msg return value, then
make mdoc_vmsg not return an int. libmdoc is now completely clean of
return-value checks from the message subsystem.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index 4e3373af..442c08a2 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -446,10 +446,10 @@ check_count(struct mdoc *m, enum mdoc_type type, } t = lvl == CHECK_WARN ? MANDOCERR_ARGCWARN : MANDOCERR_ARGCOUNT; - - return(mdoc_vmsg(m, t, m->last->line, m->last->pos, + mdoc_vmsg(m, t, m->last->line, m->last->pos, "want %s%d children (have %d)", - p, val, m->last->nchild)); + p, val, m->last->nchild); + return(1); } static int @@ -1266,7 +1266,7 @@ post_an(POST_ARGS) static int post_it(POST_ARGS) { - int i, cols, rc; + int i, cols; enum mdoc_list lt; struct mdoc_node *n, *c; enum mandocerr er; @@ -1332,10 +1332,9 @@ post_it(POST_ARGS) else er = MANDOCERR_SYNTARGCOUNT; - rc = mdoc_vmsg(mdoc, er, - mdoc->last->line, mdoc->last->pos, + mdoc_vmsg(mdoc, er, mdoc->last->line, mdoc->last->pos, "columns == %d (have %d)", cols, i); - return(rc); + return(MANDOCERR_ARGCOUNT == er); default: break; } |