| 1653 | } |
| 1654 | |
| 1655 | char *u16_option(struct command *cmd, const char *arg, bool check_only, u16 *i) |
| 1656 | { |
| 1657 | u64 n; |
| 1658 | char *problem = u64_option(cmd, arg, false, &n); |
| 1659 | |
| 1660 | if (problem) |
| 1661 | return problem; |
| 1662 | |
| 1663 | if ((u16)n != n) |
| 1664 | return tal_fmt(tmpctx, "'%s' is too large (overflow)", arg); |
| 1665 | |
| 1666 | if (!check_only) |
| 1667 | *i = n; |
| 1668 | return NULL; |
| 1669 | } |
| 1670 | |
| 1671 | char *bool_option(struct command *cmd, const char *arg, bool check_only, bool *i) |
| 1672 | { |
no test coverage detected