| 204 | } |
| 205 | |
| 206 | static struct link_ref * |
| 207 | find_link_ref(struct link_ref **references, uint8_t *name, size_t length) |
| 208 | { |
| 209 | unsigned int hash = hash_link_ref(name, length); |
| 210 | struct link_ref *ref = NULL; |
| 211 | |
| 212 | ref = references[hash % REF_TABLE_SIZE]; |
| 213 | |
| 214 | while (ref != NULL) { |
| 215 | if (ref->id == hash) |
| 216 | return ref; |
| 217 | |
| 218 | ref = ref->next; |
| 219 | } |
| 220 | |
| 221 | return NULL; |
| 222 | } |
| 223 | |
| 224 | static void |
| 225 | free_link_refs(struct link_ref **references) |
no test coverage detected