summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-07-02 12:20:49 +0200
committerSergei Golubchik <serg@mariadb.org>2022-08-02 17:49:21 +0200
commit086eb8e23c7ce6ea1dc14ce389172d1b2c9d6e6c (patch)
treeadc0391076a547ead81279d5c3015786c0275efe /mysys
parent28d44abd99a3334d1eba79f378833fc029681f38 (diff)
downloadmariadb-git-086eb8e23c7ce6ea1dc14ce389172d1b2c9d6e6c.tar.gz
my_getopt --help for "bit" options
print "Defaults to on" not only for GET_BOOL, but also for GET_BIT
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_getopt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 9747ee4214e..cb0e0e61240 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -1583,7 +1583,8 @@ void my_print_help(const struct my_option *options)
}
}
putchar('\n');
- if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL)
+ if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL ||
+ (optp->var_type & GET_TYPE_MASK) == GET_BIT)
{
if (optp->def_value != 0)
{