diff: use hashmap_entry_init on moved_entry.ent
commite010a41216efd85eacc4c0711ea405de4fb20526
authorEric Wong <e@80x24.org>
Sun, 6 Oct 2019 23:30:24 +0000 (6 23:30 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Oct 2019 01:20:09 +0000 (7 10:20 +0900)
treea136bf1cba8eb2f0185341de22b0e635d04276f1
parent745f6812895b31c02b29bdfe4ae8e5498f776c26
diff: use hashmap_entry_init on moved_entry.ent

Otherwise, the hashmap_entry.next field appears to remain
uninitialized, which can lead to problems when
add_lines_to_move_detection calls hashmap_add.

I found this through manual inspection when converting
hashmap_add callers to take "struct hashmap_entry *".

Signed-off-by: Eric Wong <e@80x24.org>
Reviewed-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c