| 163 | } |
| 164 | |
| 165 | static bool json_to_subsystem(const char *buffer, const jsmntok_t *tok, |
| 166 | struct subsystem_and_variant *sv) |
| 167 | { |
| 168 | *sv = first_sv(); |
| 169 | do { |
| 170 | if (!subsystem_to_str(sv)) |
| 171 | continue; |
| 172 | if (memeqstr(buffer + tok->start, tok->end - tok->start, |
| 173 | subsystem_to_str(sv))) { |
| 174 | return true; |
| 175 | } |
| 176 | } while (next_sv(sv)); |
| 177 | return false; |
| 178 | } |
| 179 | |
| 180 | struct per_variant { |
| 181 | /* Who are we? Back pointer, so we can just pass this around */ |
no test coverage detected