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

Function uriEmulateReallocarray

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

Source from the content-addressed store, hash-verified

149
150
151void * uriEmulateReallocarray(UriMemoryManager * memory,
152 void * ptr, size_t nmemb, size_t size) {
153 const size_t total_size = nmemb * size;
154
155 if (memory == NULL) {
156 errno = EINVAL;
157 return NULL;
158 }
159
160 URI_CHECK_ALLOC_OVERFLOW(total_size, nmemb, size); /* may return */
161
162 return memory->realloc(memory, ptr, total_size);
163}
164
165
166

Callers 2

failingReallocarrayFunction · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 2

failingReallocarrayFunction · 0.68
TESTFunction · 0.68