| 189 | /* debug_htable_find - lookup value */ |
| 190 | |
| 191 | char *debug_htable_find(DEBUG_HTABLE *table, const char *key) |
| 192 | { |
| 193 | DEBUG_HTABLE_INFO *ht; |
| 194 | unsigned n; |
| 195 | |
| 196 | if (table == NULL || key == NULL) |
| 197 | return (NULL); |
| 198 | |
| 199 | n = table->hash_fn(key, strlen(key)); |
| 200 | |
| 201 | n = n % table->size; |
| 202 | |
| 203 | for (ht = table->data[n]; ht; ht = ht->next) { |
| 204 | if (STREQ(key, ht->key)) { |
| 205 | return (ht->value); |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | return (NULL); |
| 210 | } |
| 211 | |
| 212 | /* debug_htable_locate - lookup entry */ |
| 213 |
no outgoing calls
no test coverage detected
searching dependent graphs…