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

Function find_tal_ptr

connectd/connectd.c:2156–2167  ·  view source on GitHub ↗

Stupid and slow, but machines are fast! */

Source from the content-addressed store, hash-verified

2154
2155/* Stupid and slow, but machines are fast! */
2156static const tal_t *find_tal_ptr(const tal_t *root, const tal_t *p)
2157{
2158 if (root == p)
2159 return root;
2160
2161 for (tal_t *t = tal_first(root); t; t = tal_next(t)) {
2162 const tal_t *ret = find_tal_ptr(t, p);
2163 if (ret)
2164 return ret;
2165 }
2166 return NULL;
2167}
2168
2169/* Looks up ptr in hash tree, to try to find name */
2170static 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