| 129 | }; |
| 130 | |
| 131 | static int anonymized_entry_cmp(const void *cmp_data UNUSED, |
| 132 | const struct hashmap_entry *eptr, |
| 133 | const struct hashmap_entry *entry_or_key, |
| 134 | const void *keydata) |
| 135 | { |
| 136 | const struct anonymized_entry *a, *b; |
| 137 | |
| 138 | a = container_of(eptr, const struct anonymized_entry, hash); |
| 139 | if (keydata) { |
| 140 | const struct anonymized_entry_key *key = keydata; |
| 141 | int equal = !xstrncmpz(a->orig, key->orig, key->orig_len); |
| 142 | return !equal; |
| 143 | } |
| 144 | |
| 145 | b = container_of(entry_or_key, const struct anonymized_entry, hash); |
| 146 | return strcmp(a->orig, b->orig); |
| 147 | } |
| 148 | |
| 149 | static struct anonymized_entry *add_anonymized_entry(struct hashmap *map, |
| 150 | unsigned hash, |
nothing calls this directly
no test coverage detected