MCPcopy Create free account
hub / github.com/cpputest/cpputest / strdup_alloc

Function strdup_alloc

src/CppUTest/TestHarness_c.cpp:217–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217static char* strdup_alloc(const char * str, size_t size, const char* file, size_t line)
218{
219 char* result = (char*) cpputest_malloc_location(size, file, line);
220 PlatformSpecificMemCpy(result, str, size);
221 result[size-1] = '\0';
222 return result;
223}
224
225char* cpputest_strdup_location(const char * str, const char* file, size_t line)
226{

Callers 2

cpputest_strdup_locationFunction · 0.85

Calls 2

cpputest_malloc_locationFunction · 0.85
PlatformSpecificMemCpyFunction · 0.85

Tested by

no test coverage detected