MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / uriDefaultReallocarray

Function uriDefaultReallocarray

3rd/uriparser/src/UriMemory.c:96–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94
95
96static void * uriDefaultReallocarray(UriMemoryManager * URI_UNUSED(memory),
97 void * ptr, size_t nmemb, size_t size) {
98#ifdef HAVE_REALLOCARRAY
99 return reallocarray(ptr, nmemb, size);
100#else
101 const size_t total_size = nmemb * size;
102
103 URI_CHECK_ALLOC_OVERFLOW(total_size, nmemb, size); /* may return */
104
105 return realloc(ptr, total_size);
106#endif
107}
108
109
110

Callers

nothing calls this directly

Calls 1

reallocarrayFunction · 0.85

Tested by

no test coverage detected