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

Function fd_used

lightningd/subd.c:62–69  ·  view source on GitHub ↗

Returns index of fds which is == this fd, or -1 */

Source from the content-addressed store, hash-verified

60
61/* Returns index of fds which is == this fd, or -1 */
62static int fd_used(int **fds, size_t num_fds, int fd)
63{
64 for (size_t i = 0; i < num_fds; i++) {
65 if (*fds[i] == fd)
66 return i;
67 }
68 return -1;
69}
70
71/* Move an series of fd pointers into 0, 1, ... */
72static bool shuffle_fds(int **fds, size_t num_fds)

Callers 1

shuffle_fdsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected