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

Function opt_set_u32

lightningd/options.c:78–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78static char *opt_set_u32(const char *arg, u32 *u)
79{
80 char *endp;
81 unsigned long l;
82
83 assert(arg != NULL);
84
85 /* This is how the manpage says to do it. Yech. */
86 errno = 0;
87 l = strtoul(arg, &endp, 0);
88 if (*endp || !arg[0])
89 return tal_fmt(tmpctx, "'%s' is not a number", arg);
90 *u = l;
91 if (errno || *u != l)
92 return tal_fmt(tmpctx, "'%s' is out of range", arg);
93 return NULL;
94}
95
96static char *opt_set_s32(const char *arg, s32 *u)
97{

Callers 2

opt_force_feeratesFunction · 0.85
opt_set_crash_timeoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected