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

Function json_to_u16

common/json_parse.c:73–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73bool json_to_u16(const char *buffer, const jsmntok_t *tok,
74 short unsigned int *num)
75{
76 uint64_t u64;
77
78 if (!json_to_u64(buffer, tok, &u64))
79 return false;
80 *num = u64;
81
82 /* Just in case it doesn't fit. */
83 if (*num != u64)
84 return false;
85 return true;
86}
87
88bool json_to_int(const char *buffer, const jsmntok_t *tok, int *num)
89{

Callers 6

param_channel_typeFunction · 0.70
param_u16Function · 0.70
param_id_addr_u16Function · 0.50

Calls 1

json_to_u64Function · 0.50

Tested by

no test coverage detected