MCPcopy Create free account
hub / github.com/git/git / reftable_alloc_size

Function reftable_alloc_size

reftable/basics.h:190–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188char *reftable_strdup(const char *str);
189
190static inline int reftable_alloc_size(size_t nelem, size_t elsize, size_t *out)
191{
192 if (nelem && elsize > SIZE_MAX / nelem)
193 return -1;
194 *out = nelem * elsize;
195 return 0;
196}
197
198#define REFTABLE_ALLOC_ARRAY(x, alloc) do { \
199 size_t alloc_size; \

Callers 1

reftable_alloc_growFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected