diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2022-07-08 19:25:17 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-07-08 19:34:30 +0300 |
commit | 18aae7e21e1a88c75adb38aa2555e0b1928b137d (patch) | |
tree | 1f48acc01e9e7b01cf8380dad5a9f4277db437b5 /xdiff/xdiff.h | |
parent | abf04bdaa845a6650d1f44b9f5914df442559d75 (diff) |
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>
Diffstat (limited to 'xdiff/xdiff.h')
-rw-r--r-- | xdiff/xdiff.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xdiff/xdiff.h b/xdiff/xdiff.h index 72e25a9ffa..bb56b23f34 100644 --- a/xdiff/xdiff.h +++ b/xdiff/xdiff.h @@ -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) |