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

Function u16_option

plugins/libplugin.c:1655–1669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1653}
1654
1655char *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
1671char *bool_option(struct command *cmd, const char *arg, bool check_only, bool *i)
1672{

Calls 1

u64_optionFunction · 0.85

Tested by

no test coverage detected