summaryrefslogtreecommitdiff
path: root/mysys/my_getopt.c
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@sun.com>2009-12-16 15:48:55 -0700
committerMarc Alff <marc.alff@sun.com>2009-12-16 15:48:55 -0700
commit67d945d270b8e01c9ffb9de8330885b03620eda1 (patch)
treebe48bf75b22c376754b743856f13a6f42139de8b /mysys/my_getopt.c
parenteadf9532fdee35e86544e13911549475af979f98 (diff)
parentb3d99069077cd24e1cf4bb07857fdb12aee895a0 (diff)
downloadmariadb-git-67d945d270b8e01c9ffb9de8330885b03620eda1.tar.gz
Merge mysql-next-mr (revno 2942) --> mysql-next-mr-marc
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r--mysys/my_getopt.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 8361d288bc7..f5854043459 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -444,17 +444,17 @@ invalid value '%s'",
else if (optp->arg_type == OPT_ARG &&
(((optp->var_type & GET_TYPE_MASK) == GET_BOOL) ||
(optp->var_type & GET_TYPE_MASK) == GET_ENUM))
- {
- if (optend == disabled_my_option)
- *((my_bool*) value)= (my_bool) 0;
- else
- {
- if (!optend) /* No argument -> enable option */
- *((my_bool*) value)= (my_bool) 1;
- else
- argument= optend;
- }
- }
+ {
+ if (optend == disabled_my_option)
+ init_one_value(optp, value, 0);
+ else
+ {
+ if (!optend) /* No argument -> enable option */
+ init_one_value(optp, value, 1);
+ else
+ argument= optend;
+ }
+ }
else if (optp->arg_type == REQUIRED_ARG && !optend)
{
/* Check if there are more arguments after this one,