Skip to content

Commit

Permalink
alloc: make allocate_alloc_state and clear_alloc_state more consistent
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
newren authored and gitster committed Aug 15, 2018
1 parent ef3ca95 commit 1731310
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct alloc_state {
int slab_nr, slab_alloc;
};

void *allocate_alloc_state(void)
struct alloc_state *allocate_alloc_state(void)
{
return xcalloc(1, sizeof(struct alloc_state));
}
Expand Down
2 changes: 1 addition & 1 deletion alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void *alloc_object_node(struct repository *r);
void alloc_report(struct repository *r);
unsigned int alloc_commit_index(struct repository *r);

void *allocate_alloc_state(void);
struct alloc_state *allocate_alloc_state(void);
void clear_alloc_state(struct alloc_state *s);

#endif

0 comments on commit 1731310

Please sign in to comment.