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

Function opt_set_u64

lightningd/options.c:49–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static char *opt_set_u64(const char *arg, u64 *u)
50{
51 char *endp;
52 unsigned long long l;
53
54 assert(arg != NULL);
55
56 /* This is how the manpage says to do it. Yech. */
57 errno = 0;
58 l = strtoull(arg, &endp, 0);
59 if (*endp || !arg[0])
60 return tal_fmt(tmpctx, "'%s' is not a number", arg);
61 *u = l;
62 if (errno || *u != l)
63 return tal_fmt(tmpctx, "'%s' is out of range", arg);
64 return NULL;
65}
66
67static char *opt_set_u64_dynamic(const char *arg, u64 *u)
68{

Callers 2

opt_set_u64_dynamicFunction · 0.85
opt_add_accept_htlc_tlvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected