| 135 | } |
| 136 | |
| 137 | static 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 | |
| 158 | static struct command_result *parse_by_name(struct command *cmd, |
| 159 | struct param *params, |
no test coverage detected