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

Function json_to_zero_or_one

common/json_parse.c:103–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103bool json_to_zero_or_one(const char *buffer, const jsmntok_t *tok, int *num)
104{
105 u32 v32;
106 if (!json_to_u32(buffer, tok, &v32))
107 return false;
108 if (v32 != 0 && v32 != 1)
109 return false;
110 *num = v32;
111 return true;
112}
113
114bool json_to_jsonrpc_errcode(const char *buffer, const jsmntok_t *tok,
115 enum jsonrpc_errcode *errcode)

Callers 1

Calls 1

json_to_u32Function · 0.50

Tested by

no test coverage detected