summaryrefslogtreecommitdiff
path: root/contrib/coccinelle/hashmap.cocci
AgeCommit message (Collapse)AuthorFilesLines
2019-10-07coccicheck: detect hashmap_entry.hash assignmentLibravatar Eric Wong1-0/+16
Assigning hashmap_entry.hash manually leaves hashmap_entry.next uninitialized, which can be dangerous once the hashmap_entry is inserted into a hashmap. Detect those assignments and use hashmap_entry_init, instead. Signed-off-by: Eric Wong <e@80x24.org> Reviewed-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>