| 33 | } |
| 34 | |
| 35 | static bool json_to_subsystem(const char *buffer, const jsmntok_t *tok, |
| 36 | enum subsystem *subsystem) |
| 37 | { |
| 38 | for (size_t i = 0; i < NUM_SUBSYSTEM; i++) { |
| 39 | if (memeqstr(buffer + tok->start, tok->end - tok->start, |
| 40 | subsystem_str[i])) { |
| 41 | *subsystem = i; |
| 42 | return true; |
| 43 | } |
| 44 | } |
| 45 | return false; |
| 46 | } |
| 47 | |
| 48 | /* Usually this refers to the global one, but for autoclean-once |
| 49 | * it's a temporary. */ |
no test coverage detected