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

Function u32_option

plugins/libplugin.c:1639–1653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1637}
1638
1639char *u32_option(struct command *cmd, const char *arg, bool check_only, u32 *i)
1640{
1641 u64 n;
1642 char *problem = u64_option(cmd, arg, false, &n);
1643
1644 if (problem)
1645 return problem;
1646
1647 if ((u32)n != n)
1648 return tal_fmt(tmpctx, "'%s' is too large (overflow)", arg);
1649
1650 if (!check_only)
1651 *i = n;
1652 return NULL;
1653}
1654
1655char *u16_option(struct command *cmd, const char *arg, bool check_only, u16 *i)
1656{

Callers

nothing calls this directly

Calls 1

u64_optionFunction · 0.85

Tested by

no test coverage detected