aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_argv.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-08 07:30:19 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-08 07:30:19 +0000
commit29086c29fdd989b9c086bf25e0790ba21243c4ff (patch)
tree50a8ad3ca3079d5cf210d324169efe8e8f96b62d /mdoc_argv.c
parent98c1a46e2586de979ce0fc696b15d91fb80166c5 (diff)
downloadmandoc-29086c29fdd989b9c086bf25e0790ba21243c4ff.tar.gz
mandoc-29086c29fdd989b9c086bf25e0790ba21243c4ff.tar.zst
mandoc-29086c29fdd989b9c086bf25e0790ba21243c4ff.zip
Lint fixes (type-safety for enums via -cefuh).
Diffstat (limited to 'mdoc_argv.c')
-rw-r--r--mdoc_argv.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c
index c1a5ee31..8f973e21 100644
--- a/mdoc_argv.c
+++ b/mdoc_argv.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_argv.c,v 1.42 2010/05/07 15:49:36 kristaps Exp $ */
+/* $Id: mdoc_argv.c,v 1.43 2010/05/08 07:30:19 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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;