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

Function cpputest_strndup_location

src/CppUTest/TestHarness_c.cpp:231–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231char* cpputest_strndup_location(const char * str, size_t n, const char* file, size_t line)
232{
233 size_t length = test_harness_c_strlen(str);
234 length = length < n ? length : n;
235 length = length + 1;
236 return strdup_alloc(str, length, file, line);
237}
238
239
240void* cpputest_calloc_location(size_t num, size_t size, const char* file, size_t line)

Callers 1

cpputest_strndupFunction · 0.85

Calls 2

test_harness_c_strlenFunction · 0.85
strdup_allocFunction · 0.85

Tested by

no test coverage detected