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

Function find_param

common/json_param.c:137–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137static struct param *find_param(struct command *cmd,
138 struct param *params, const char *start,
139 size_t n)
140{
141 struct param *first = params;
142 struct param *last = first + tal_count(params);
143
144 while (first != last) {
145 if (memeqstr(start, n, first->name)) {
146 if (!command_deprecated_in_ok(cmd, first->name,
147 first->depr_start,
148 first->depr_end)) {
149 return NULL;
150 }
151 return first;
152 }
153 first++;
154 }
155 return NULL;
156}
157
158static struct command_result *parse_by_name(struct command *cmd,
159 struct param *params,

Callers 1

parse_by_nameFunction · 0.85

Calls 2

memeqstrFunction · 0.85
command_deprecated_in_okFunction · 0.50

Tested by

no test coverage detected