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

Function configvar_iter

common/configvar.c:217–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217static struct configvar *configvar_iter(struct configvar **cvs,
218 const char **names,
219 const struct configvar *firstcv)
220{
221 for (size_t i = 0; i < tal_count(cvs); i++) {
222 /* Wait until we reach firstcv, if any */
223 if (firstcv) {
224 if (cvs[i] == firstcv)
225 firstcv = NULL;
226 continue;
227 }
228 for (size_t j = 0; j < tal_count(names); j++) {
229 /* In case we iterate before initialization! */
230 if (!cvs[i]->optvar)
231 continue;
232 if (streq(cvs[i]->optvar, names[j]) && !cvs[i]->overridden)
233 return cvs[i];
234 }
235 }
236 return NULL;
237}
238
239struct configvar *configvar_first(struct configvar **cvs, const char **names)
240{

Callers 2

configvar_firstFunction · 0.85
configvar_nextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected