| 105 | } |
| 106 | |
| 107 | bool 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 | |
| 122 | bool json_to_int(const char *buffer, const jsmntok_t *tok, int *num) |
| 123 | { |
nothing calls this directly
no test coverage detected