diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-08 07:30:19 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-08 07:30:19 +0000 |
commit | c10df4f63596660b1a585dd712a0778b88ec5874 (patch) | |
tree | f77bfbb9e507408371b66a87df9e677a040288a1 /mdoc_argv.c | |
parent | 0f679b197ab273ae0779713155a8a455d4a770fe (diff) | |
download | mandoc-c10df4f63596660b1a585dd712a0778b88ec5874.tar.gz |
Lint fixes (type-safety for enums via -cefuh).
Diffstat (limited to 'mdoc_argv.c')
-rw-r--r-- | mdoc_argv.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c index 5519d07f..40237f20 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -666,16 +666,16 @@ static int argv_multi(struct mdoc *m, int line, struct mdoc_argv *v, int *pos, char *buf) { - int c; + enum margserr ac; char *p; for (v->sz = 0; ; v->sz++) { if ('-' == buf[*pos]) break; - c = args(m, line, pos, buf, 0, &p); - if (ARGS_ERROR == c) + ac = args(m, line, pos, buf, 0, &p); + if (ARGS_ERROR == ac) return(0); - else if (ARGS_EOLN == c) + else if (ARGS_EOLN == ac) break; if (0 == v->sz % MULTI_STEP) @@ -693,16 +693,16 @@ static int argv_opt_single(struct mdoc *m, int line, struct mdoc_argv *v, int *pos, char *buf) { - int c; + enum margserr ac; char *p; if ('-' == buf[*pos]) return(1); - c = args(m, line, pos, buf, 0, &p); - if (ARGS_ERROR == c) + ac = args(m, line, pos, buf, 0, &p); + if (ARGS_ERROR == ac) return(0); - if (ARGS_EOLN == c) + if (ARGS_EOLN == ac) return(1); v->sz = 1; @@ -720,15 +720,16 @@ static int argv_single(struct mdoc *m, int line, struct mdoc_argv *v, int *pos, char *buf) { - int c, ppos; + int ppos; + enum margserr ac; char *p; ppos = *pos; - c = args(m, line, pos, buf, 0, &p); - if (ARGS_ERROR == c) + ac = args(m, line, pos, buf, 0, &p); + if (ARGS_ERROR == ac) return(0); - if (ARGS_EOLN == c) + if (ARGS_EOLN == ac) return(mdoc_perr(m, line, ppos, EARGVAL)); v->sz = 1; |