MCPcopy Create free account
hub / github.com/ElementsProject/lightning / u16_option

Function u16_option

plugins/libplugin.c:1645–1659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1643}
1644
1645char *u16_option(struct command *cmd, const char *arg, bool check_only, u16 *i)
1646{
1647 u64 n;
1648 char *problem = u64_option(cmd, arg, false, &n);
1649
1650 if (problem)
1651 return problem;
1652
1653 if ((u16)n != n)
1654 return tal_fmt(tmpctx, "'%s' is too large (overflow)", arg);
1655
1656 if (!check_only)
1657 *i = n;
1658 return NULL;
1659}
1660
1661char *bool_option(struct command *cmd, const char *arg, bool check_only, bool *i)
1662{

Calls 1

u64_optionFunction · 0.85

Tested by

no test coverage detected