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

Function rbuf_init

ccan/ccan/rbuf/rbuf.h:23–29  ·  view source on GitHub ↗

* rbuf_init - set up a buffer. * @rbuf: the struct rbuf. * @fd: the file descriptor. * @buf: the buffer to use. * @buf_max: the size of the buffer. * @expandfn: usually membuf_realloc. */

Source from the content-addressed store, hash-verified

21 * @expandfn: usually membuf_realloc.
22 */
23static inline void rbuf_init(struct rbuf *rbuf,
24 int fd, char *buffer, size_t buf_max,
25 void *(*expandfn)(struct membuf *, void *, size_t))
26{
27 rbuf->fd = fd;
28 membuf_init(&rbuf->m, buffer, buf_max, expandfn);
29}
30
31/**
32 * rbuf_open - set up a buffer by opening a file.

Callers 7

tor_autoserviceFunction · 0.85
tor_fixed_serviceFunction · 0.85
mainFunction · 0.85
rbuf_openFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 3

mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68