Skip to content

Commit 1731310

Browse files
newrengitster
authored andcommitted
alloc: make allocate_alloc_state and clear_alloc_state more consistent
Since both functions are using the same data type, they should either both refer to it as void *, or both use the real type (struct alloc_state *). Opt for the latter. Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ef3ca95 commit 1731310

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct alloc_state {
3636
int slab_nr, slab_alloc;
3737
};
3838

39-
void *allocate_alloc_state(void)
39+
struct alloc_state *allocate_alloc_state(void)
4040
{
4141
return xcalloc(1, sizeof(struct alloc_state));
4242
}

alloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void *alloc_object_node(struct repository *r);
1515
void alloc_report(struct repository *r);
1616
unsigned int alloc_commit_index(struct repository *r);
1717

18-
void *allocate_alloc_state(void);
18+
struct alloc_state *allocate_alloc_state(void);
1919
void clear_alloc_state(struct alloc_state *s);
2020

2121
#endif

0 commit comments

Comments
 (0)