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

Function configvar_iter

common/configvar.c:222–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

configvar_firstFunction · 0.85
configvar_nextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected