MCPcopy Create free account
hub / github.com/HiLab-git/SimpleCRF / string_resize

Function string_resize

dependency/densecrf/examples/lodepng.cpp:279–288  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

277#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
278/*returns 1 if success, 0 if failure ==> nothing done*/
279static unsigned string_resize(char** out, size_t size)
280{
281 char* data = (char*)lodepng_realloc(*out, size + 1);
282 if(data)
283 {
284 data[size] = 0; /*null termination char*/
285 *out = data;
286 }
287 return data != 0;
288}
289
290/*init a {char*, size_t} pair for use as string*/
291static 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