tree-walk.c: do not leak internal structure in tree_entry_len()
tree_entry_len() does not simply take two random arguments and return
a tree length. The two pointers must point to a tree item structure,
or struct name_entry. Passing random pointers will return incorrect
value.
Force callers to pass struct name_entry instead of two pointers (with
hope that they don't manually construct struct name_entry themselves)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Nguyễn Thái Ngọc Duy13 years agocommitted byJunio C Hamano
@ -446,7 +446,7 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,
@@ -446,7 +446,7 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,