diff options
| author | Eric Wong <e@80x24.org> | 2019-10-06 23:30:27 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-10-07 10:20:09 +0900 |
| commit | d22245a2e360d2e708ca37169be8eb5a5899b98d (patch) | |
| tree | f1bde8f5da6ea424fa1f9538d6debd4b5fd6b5f4 /sequencer.c | |
| parent | packfile: use hashmap_entry in delta_base_cache_entry (diff) | |
| download | git-d22245a2e360d2e708ca37169be8eb5a5899b98d.tar.gz git-d22245a2e360d2e708ca37169be8eb5a5899b98d.zip | |
hashmap_entry_init takes "struct hashmap_entry *"
C compilers do type checking to make life easier for us. So
rely on that and update all hashmap_entry_init callers to take
"struct hashmap_entry *" to avoid future bugs while improving
safety and readability.
Signed-off-by: Eric Wong <e@80x24.org>
Reviewed-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
| -rw-r--r-- | sequencer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c index 34ebf8ed94..1140cdf526 100644 --- a/sequencer.c +++ b/sequencer.c @@ -4538,7 +4538,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, strihash(label)); + hashmap_entry_init(&labels_entry->entry, strihash(label)); hashmap_add(&state->labels, labels_entry); FLEX_ALLOC_STR(string_entry, string, label); @@ -5252,7 +5252,8 @@ int todo_list_rearrange_squash(struct todo_list *todo_list) strhash(subject), subject)) { FLEX_ALLOC_MEM(entry, subject, subject, subject_len); entry->i = i; - hashmap_entry_init(entry, strhash(entry->subject)); + hashmap_entry_init(&entry->entry, + strhash(entry->subject)); hashmap_put(&subject2item, entry); } } |
