| 722 | } |
| 723 | |
| 724 | static void parse_options_check_harder(const struct option *opts) |
| 725 | { |
| 726 | struct strset long_names = STRSET_INIT; |
| 727 | |
| 728 | for (; opts->type != OPTION_END; opts++) { |
| 729 | if (opts->long_name) { |
| 730 | if (!strset_add(&long_names, opts->long_name)) |
| 731 | optbug(opts, "long name already used"); |
| 732 | } |
| 733 | } |
| 734 | BUG_if_bug("invalid 'struct option'"); |
| 735 | strset_clear(&long_names); |
| 736 | } |
| 737 | |
| 738 | static int has_subcommands(const struct option *options) |
| 739 | { |
no test coverage detected