MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_to_subsystem

Function json_to_subsystem

plugins/autoclean.c:35–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35static 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. */

Callers 1

param_subsystemFunction · 0.85

Calls 1

memeqstrFunction · 0.85

Tested by

no test coverage detected