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

Function json_to_u16

common/json_parse.c:107–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107bool json_to_u16(const char *buffer, const jsmntok_t *tok,
108 short unsigned int *num)
109{
110 uint64_t u64;
111
112 if (!json_to_u64(buffer, tok, &u64))
113 return false;
114 *num = u64;
115
116 /* Just in case it doesn't fit. */
117 if (*num != u64)
118 return false;
119 return true;
120}
121
122bool json_to_int(const char *buffer, const jsmntok_t *tok, int *num)
123{

Callers

nothing calls this directly

Calls 1

json_to_u64Function · 0.70

Tested by

no test coverage detected