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

Function u32_option

plugins/libplugin.c:1629–1643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1627}
1628
1629char *u32_option(struct command *cmd, const char *arg, bool check_only, u32 *i)
1630{
1631 u64 n;
1632 char *problem = u64_option(cmd, arg, false, &n);
1633
1634 if (problem)
1635 return problem;
1636
1637 if ((u32)n != n)
1638 return tal_fmt(tmpctx, "'%s' is too large (overflow)", arg);
1639
1640 if (!check_only)
1641 *i = n;
1642 return NULL;
1643}
1644
1645char *u16_option(struct command *cmd, const char *arg, bool check_only, u16 *i)
1646{

Callers

nothing calls this directly

Calls 1

u64_optionFunction · 0.85

Tested by

no test coverage detected