aboutsummaryrefslogtreecommitdiffstats
path: root/util/argparse.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-02-11 23:22:09 +0000
committerWerner Koch <[email protected]>1998-02-11 23:22:09 +0000
commitbc5789665ae8c9f8fc3d02841cd6c9ade447a12a (patch)
treea98aa9fdf58eaffecb38ce481606ee8536280fc8 /util/argparse.c
parenta couple of changes; but some parts are now broken (diff)
downloadgnupg-bc5789665ae8c9f8fc3d02841cd6c9ade447a12a.tar.gz
gnupg-bc5789665ae8c9f8fc3d02841cd6c9ade447a12a.zip
bug fixes
Diffstat (limited to '')
-rw-r--r--util/argparse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/argparse.c b/util/argparse.c
index 795e87648..0c8ad8f0b 100644
--- a/util/argparse.c
+++ b/util/argparse.c
@@ -221,10 +221,10 @@ optfile_parse( FILE *fp, const char *filename, unsigned *lineno,
arg->r_opt = -arg->r_opt;
if( !opts[index].short_opt )
arg->r_opt = -2; /* unknown option */
- else if( (opts[index].flags & 8) ) /* no optional argument */
- arg->r_type = 0; /* okay */
- else /* no required argument */
+ else if( (opts[index].flags & 8) ) /* no argument */
arg->r_opt = -3; /* error */
+ else /* no or optiona argument */
+ arg->r_type = 0; /* okay */
break;
}
else if( state == 3 ) { /* no argument found */