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

Function json_to_u32

common/json_parse_simple.c:132–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132bool json_to_u32(const char *buffer, const jsmntok_t *tok, u32 *num)
133{
134 uint64_t u64;
135
136 if (!json_to_u64(buffer, tok, &u64))
137 return false;
138 *num = u64;
139
140 /* Just in case it doesn't fit. */
141 if (*num != u64)
142 return false;
143 return true;
144}
145
146bool json_to_bool(const char *buffer, const jsmntok_t *tok, bool *b)
147{

Callers

nothing calls this directly

Calls 1

json_to_u64Function · 0.70

Tested by

no test coverage detected