| 20 | } |
| 21 | |
| 22 | static void *xrealloc(void *ptr, size_t size) { |
| 23 | void *new_ptr = realloc(ptr, size); |
| 24 | if (!new_ptr) { |
| 25 | fprintf(stderr, "[cmark] realloc returned null pointer, aborting\n"); |
| 26 | abort(); |
| 27 | } |
| 28 | return new_ptr; |
| 29 | } |
| 30 | |
| 31 | cmark_mem DEFAULT_MEM_ALLOCATOR = {xcalloc, xrealloc, free}; |
| 32 |
nothing calls this directly
no outgoing calls
no test coverage detected