| 130 | } |
| 131 | |
| 132 | bool 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 | |
| 146 | bool json_to_bool(const char *buffer, const jsmntok_t *tok, bool *b) |
| 147 | { |
nothing calls this directly
no test coverage detected