MCPcopy Create free account
hub / github.com/acl-dev/acl / debug_htable_create

Function debug_htable_create

lib_acl/src/stdlib/debug/debug_htable.c:124–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122/* debug_htable_create - create initial hash table */
123
124DEBUG_HTABLE *debug_htable_create(int size)
125{
126 DEBUG_HTABLE *table;
127 int ret;
128
129 table = (DEBUG_HTABLE *) CALLOC(1, sizeof(DEBUG_HTABLE));
130 if(table == NULL)
131 return (NULL);
132
133 table->init_size = size;
134
135 ret = debug_htable_size(table, size < 13 ? 13 : size);
136 if(ret < 0) {
137 FREE(table);
138 return(NULL);
139 }
140
141 table->hash_fn = __def_hash_fn;
142 return (table);
143}
144
145#define STREQ(x,y) (x == y || (x[0] == y[0] && strcmp(x,y) == 0))
146

Callers 1

acl_debug_malloc_initFunction · 0.85

Calls 1

debug_htable_sizeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…