diff options
Diffstat (limited to 'tools/lib/subcmd/parse-options.c')
-rw-r--r-- | tools/lib/subcmd/parse-options.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/subcmd/parse-options.c b/tools/lib/subcmd/parse-options.c index 3284bb14ae78..8aad81151d50 100644 --- a/tools/lib/subcmd/parse-options.c +++ b/tools/lib/subcmd/parse-options.c | |||
@@ -213,6 +213,9 @@ static int get_value(struct parse_opt_ctx_t *p, | |||
213 | else | 213 | else |
214 | err = get_arg(p, opt, flags, (const char **)opt->value); | 214 | err = get_arg(p, opt, flags, (const char **)opt->value); |
215 | 215 | ||
216 | if (opt->set) | ||
217 | *(bool *)opt->set = true; | ||
218 | |||
216 | /* PARSE_OPT_NOEMPTY: Allow NULL but disallow empty string. */ | 219 | /* PARSE_OPT_NOEMPTY: Allow NULL but disallow empty string. */ |
217 | if (opt->flags & PARSE_OPT_NOEMPTY) { | 220 | if (opt->flags & PARSE_OPT_NOEMPTY) { |
218 | const char *val = *(const char **)opt->value; | 221 | const char *val = *(const char **)opt->value; |