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

Function find_tal_ptr

connectd/connectd.c:2204–2215  ·  view source on GitHub ↗

Stupid and slow, but machines are fast! */

Source from the content-addressed store, hash-verified

2202
2203/* Stupid and slow, but machines are fast! */
2204static const tal_t *find_tal_ptr(const tal_t *root, const tal_t *p)
2205{
2206 if (root == p)
2207 return root;
2208
2209 for (tal_t *t = tal_first(root); t; t = tal_next(t)) {
2210 const tal_t *ret = find_tal_ptr(t, p);
2211 if (ret)
2212 return ret;
2213 }
2214 return NULL;
2215}
2216
2217/* Looks up ptr in hash tree, to try to find name */
2218static const char *try_tal_name(const tal_t *ctx, const void *p)

Callers 1

try_tal_nameFunction · 0.85

Calls 2

tal_firstFunction · 0.85
tal_nextFunction · 0.85

Tested by

no test coverage detected