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

Function opt_names_arr

lightningd/configs.c:242–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242static const char **opt_names_arr(const tal_t *ctx,
243 const struct opt_table *ot)
244{
245 const char **names = tal_arr(ctx, const char *, 0);
246 const char *name;
247 unsigned len;
248
249 for (name = first_name(ot->names, &len);
250 name;
251 name = next_name(name, &len)) {
252 /* Skips over first -, so just need to look for one */
253 if (name[0] != '-')
254 continue;
255 tal_arr_expand(&names,
256 tal_strndup(names, name+1, len-1));
257 }
258 return names;
259}
260
261static struct command_result *json_listconfigs(struct command *cmd,
262 const char *buffer,

Callers 3

json_listconfigsFunction · 0.85
setconfig_successFunction · 0.85
json_setconfigFunction · 0.85

Calls 2

first_nameFunction · 0.70
next_nameFunction · 0.70

Tested by

no test coverage detected