diff options
author | jani@hynda.(none) <> | 2002-08-19 16:27:59 +0300 |
---|---|---|
committer | jani@hynda.(none) <> | 2002-08-19 16:27:59 +0300 |
commit | 706bae5cf2e7c5f3c1379df749567cad4992895a (patch) | |
tree | 96a3c269db9013fddb63bb77509369c7225341c6 /mysys/my_getopt.c | |
parent | a5edb200421018ee967045903b2802c2d5c1bd75 (diff) | |
download | mariadb-git-706bae5cf2e7c5f3c1379df749567cad4992895a.tar.gz |
A compatibility fix in my_getopt for boolean variables. All of
these work now and do the same thing: --lower-case-table-names,
--lower-case-table-names=1, -O lower-case-table-names=1,
--set-variable=lower-case-table-names=1
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r-- | mysys/my_getopt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 436e557c914..5b86fddbbdb 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -269,7 +269,7 @@ int handle_options(int *argc, char ***argv, return EXIT_AMBIGUOUS_OPTION; } } - if (must_be_var && (!optp->value || optp->var_type == GET_BOOL)) + if (must_be_var && !optp->value) { if (my_getopt_print_errors) fprintf(stderr, "%s: option '%s' cannot take an argument\n", @@ -278,7 +278,7 @@ int handle_options(int *argc, char ***argv, } if (optp->arg_type == NO_ARG) { - if (optend && !special_used) + if (optend && special_used) { if (my_getopt_print_errors) fprintf(stderr, "%s: option '--%s' cannot take an argument\n", |