| 1679 | } |
| 1680 | |
| 1681 | char *flag_option(struct command *cmd, const char *arg, bool check_only, bool *i) |
| 1682 | { |
| 1683 | /* We only get called if the flag was provided, so *i should be false |
| 1684 | * by default */ |
| 1685 | assert(check_only || *i == false); |
| 1686 | if (!streq(arg, "true")) |
| 1687 | return tal_fmt(tmpctx, "Invalid argument '%s' passed to a flag", arg); |
| 1688 | |
| 1689 | if (!check_only) |
| 1690 | *i = true; |
| 1691 | return NULL; |
| 1692 | } |
| 1693 | |
| 1694 | char *charp_option(struct command *cmd, const char *arg, bool check_only, char **p) |
| 1695 | { |
nothing calls this directly
no outgoing calls
no test coverage detected