xdiff: introduce xdl_calloc
In preparation for introducing XDL_CALLOC_ARRAY() use calloc() to obtain zeroed out memory rather than malloc() followed by memset(). To try and keep the lines a reasonable length this commit also stops casting the pointer returned by calloc() as this is unnecessary. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
abf04bdaa8
commit
18aae7e21e
@ -120,6 +120,7 @@ typedef struct s_bdiffparam {
|
||||
|
||||
|
||||
#define xdl_malloc(x) xmalloc(x)
|
||||
#define xdl_calloc(n, sz) xcalloc(n, sz)
|
||||
#define xdl_free(ptr) free(ptr)
|
||||
#define xdl_realloc(ptr,x) xrealloc(ptr,x)
|
||||
|
||||
|
Reference in New Issue
Block a user