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

Function test_alloc

ccan/ccan/timer/test/run-expire-alloc-fail.c:20–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18static bool alloc_fails;
19
20static void *test_alloc(struct timers *timers, size_t len)
21{
22 (void)timers;
23 if (alloc_fails)
24 return NULL;
25 return malloc(len);
26}
27
28static void test_free(struct timers *timers, void *p)
29{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected