diff options
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r-- | mysys/my_getopt.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 98d3b9756ed..b0ca55d46ba 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -414,17 +414,11 @@ invalid value '%s'", (optp->var_type & GET_TYPE_MASK) == GET_ENUM)) { if (optend == disabled_my_option) - if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL) - *((my_bool*) value)= (my_bool) 0; - else - *((ulong*) value)= (ulong) 0; + init_one_value(optp, value, 0); else { if (!optend) /* No argument -> enable option */ - if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL) - *((my_bool*) value)= (my_bool) 1; - else - *((ulong*) value)= (ulong) 1; + init_one_value(optp, value, 1); else argument= optend; } |