| 101 | } |
| 102 | |
| 103 | bool 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 | |
| 114 | bool json_to_jsonrpc_errcode(const char *buffer, const jsmntok_t *tok, |
| 115 | enum jsonrpc_errcode *errcode) |
no test coverage detected