Skip to content

Commit 16aa3bf

Browse files
mhaggergitster
authored andcommitted
fsck: don't put a void*-shaped peg in a char*-shaped hole
The source of this nonsense was 04d3975 fsck: reduce stack footprint , which wedged a pointer to parent into the object_array_entry's name field. The parent pointer was passed to traverse_one_object(), even though that function *didn't use it*. The useless code has been deleted over time. Commit a1cdc25 fsck: drop unused parameter from traverse_one_object() removed the parent pointer from traverse_one_object()'s signature. Commit c0aa335 Remove unused variables removed the code that read the parent pointer back out of the name field. This commit takes the last step: don't write the parent pointer into the name field in the first place. Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1506510 commit 16aa3bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/fsck.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int mark_object(struct object *obj, int type, void *data)
112112
return 1;
113113
}
114114

115-
add_object_array(obj, (void *) parent, &pending);
115+
add_object_array(obj, NULL, &pending);
116116
return 0;
117117
}
118118

0 commit comments

Comments
 (0)