MCPcopy Create free account
hub / github.com/DFHack/dfhack / lodepng_realloc

Function lodepng_realloc

depends/lodepng/lodepng.cpp:82–87  ·  view source on GitHub ↗

NOTE: when realloc returns NULL, it leaves the original memory untouched */

Source from the content-addressed store, hash-verified

80
81/* NOTE: when realloc returns NULL, it leaves the original memory untouched */
82static void* lodepng_realloc(void* ptr, size_t new_size) {
83#ifdef LODEPNG_MAX_ALLOC
84 if(new_size > LODEPNG_MAX_ALLOC) return 0;
85#endif
86 return realloc(ptr, new_size);
87}
88
89static void lodepng_free(void* ptr) {
90 free(ptr);

Callers 5

uivector_resizeFunction · 0.85
ucvector_resizeFunction · 0.85
lodepng_chunk_appendFunction · 0.85
lodepng_add_text_sizedFunction · 0.85
lodepng_add_itext_sizedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected