cmdutils: remove unnecessary OPT_DUMMY implementation
The -i INPUT option can be implemented more cleanly by using a function option, which can easily be done now that the parse_arg_function passed to parse_options has a standard signature.
This commit is contained in:
@ -273,8 +273,6 @@ unknown_opt:
|
||||
*po->u.int64_arg = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX);
|
||||
} else if (po->flags & OPT_FLOAT) {
|
||||
*po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY);
|
||||
} else if (po->flags & OPT_DUMMY) {
|
||||
/* Do nothing for this option */
|
||||
} else {
|
||||
if (po->u.func_arg(opt, arg) < 0) {
|
||||
fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt);
|
||||
|
Reference in New Issue
Block a user