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

Function reftable_calloc

reftable/basics.c:47–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void *reftable_calloc(size_t nelem, size_t elsize)
48{
49 void *p;
50
51 if (nelem && elsize > SIZE_MAX / nelem)
52 return NULL;
53
54 p = reftable_malloc(nelem * elsize);
55 if (!p)
56 return NULL;
57
58 memset(p, 0, nelem * elsize);
59 return p;
60}
61
62char *reftable_strdup(const char *str)
63{

Callers 8

t_table_refs_forFunction · 0.85
padded_writeFunction · 0.85
reftable_writer_newFunction · 0.85
stack_copy_tablesFunction · 0.85
reftable_new_stackFunction · 0.85

Calls 1

reftable_mallocFunction · 0.85

Tested by 1