MCPcopy Create free account
hub / github.com/GJDuck/e9patch / static_reallocarray

Function static_reallocarray

contrib/libdw/system.h:102–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101#if !HAVE_DECL_REALLOCARRAY
102static inline void *
103static_reallocarray (void *ptr, size_t nmemb, size_t size)
104{
105 if (size > 0 && nmemb > SIZE_MAX / size)
106 {
107 errno = ENOMEM;
108 return NULL;
109 }
110 return realloc (ptr, nmemb * size);
111}
112#undef reallocarray
113#define reallocarray(ptr, nmemb, size) \
114 static_reallocarray((ptr), (nmemb), (size))

Callers

nothing calls this directly

Calls 1

reallocFunction · 0.85

Tested by

no test coverage detected