Elijah Newren wrote: > 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. > > Signed-off-by: Elijah Newren <newren@xxxxxxxxx> > --- > alloc.c | 2 +- > alloc.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) This API comes from 14ba97f8 (alloc: allow arbitrary repositories for alloc functions, 2018-05-15). The pointer returned by allocate_alloc_state points to an initialized, usable object so returning a struct instead of a void pointer is the right thing to do. Thanks for noticing and fixing it. That commit in turn was probably inspired by v1.5.2-rc0~16^2 (Clean up object creation to use more common code, 2007-04-16), which was following the same convention (void * for raw memory, struct blob * for initialized object). Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx>