MCPcopy Create free account
hub / github.com/creatale/node-dv / string_resize

Function string_resize

deps/lodepng/lodepng.cpp:287–296  ·  view source on GitHub ↗

returns 1 if success, 0 if failure ==> nothing done*/

Source from the content-addressed store, hash-verified

285#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
286/*returns 1 if success, 0 if failure ==> nothing done*/
287static unsigned string_resize(char** out, size_t size)
288{
289 char* data = (char*)lodepng_realloc(*out, size + 1);
290 if(data)
291 {
292 data[size] = 0; /*null termination char*/
293 *out = data;
294 }
295 return data != 0;
296}
297
298/*init a {char*, size_t} pair for use as string*/
299static void string_init(char** out)

Callers 2

string_initFunction · 0.85
string_setFunction · 0.85

Calls 1

lodepng_reallocFunction · 0.85

Tested by

no test coverage detected