Add 'value' to a hashmap based on the provided 'key'. */
| 113 | |
| 114 | /* Add 'value' to a hashmap based on the provided 'key'. */ |
| 115 | static void attr_hashmap_add(struct attr_hashmap *map, |
| 116 | const char *key, size_t keylen, |
| 117 | void *value) |
| 118 | { |
| 119 | struct attr_hash_entry *e; |
| 120 | |
| 121 | e = xmalloc(sizeof(struct attr_hash_entry)); |
| 122 | hashmap_entry_init(&e->ent, memhash(key, keylen)); |
| 123 | e->key = key; |
| 124 | e->keylen = keylen; |
| 125 | e->value = value; |
| 126 | |
| 127 | hashmap_add(&map->map, &e->ent); |
| 128 | } |
| 129 | |
| 130 | struct all_attrs_item { |
| 131 | const struct git_attr *attr; |
no test coverage detected