| 122 | /* debug_htable_create - create initial hash table */ |
| 123 | |
| 124 | DEBUG_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 |
no test coverage detected
searching dependent graphs…