]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sequencer.c
hashmap: use *_entry APIs to wrap container_of
[thirdparty/git.git] / sequencer.c
index 1140cdf52676d8446b4442120884d58e963d3920..b4ef70e26063c50e887d20fda90a7b248738866d 100644 (file)
@@ -4539,7 +4539,7 @@ static const char *label_oid(struct object_id *oid, const char *label,
 
        FLEX_ALLOC_STR(labels_entry, label, label);
        hashmap_entry_init(&labels_entry->entry, strihash(label));
-       hashmap_add(&state->labels, labels_entry);
+       hashmap_add(&state->labels, &labels_entry->entry);
 
        FLEX_ALLOC_STR(string_entry, string, label);
        oidcpy(&string_entry->entry.oid, oid);
@@ -5254,7 +5254,7 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
                        entry->i = i;
                        hashmap_entry_init(&entry->entry,
                                        strhash(entry->subject));
-                       hashmap_put(&subject2item, entry);
+                       hashmap_put(&subject2item, &entry->entry);
                }
        }