summaryrefslogtreecommitdiff
path: root/range-diff.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-03-19 15:25:38 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-03-19 15:25:38 -0700
commit92ccd7b7529a852583c5033ba28b4414cd2f7654 (patch)
treebce1548bcd2cd806a4524b812fb56f19b397b7d2 /range-diff.c
parentMerge branch 'rs/avoid-null-statement-after-macro-call' (diff)
parentcocci: allow xcalloc(1, size) (diff)
downloadtgif-92ccd7b7529a852583c5033ba28b4414cd2f7654.tar.xz
Merge branch 'rs/calloc-array'
CALLOC_ARRAY() macro replaces many uses of xcalloc(). * rs/calloc-array: cocci: allow xcalloc(1, size) use CALLOC_ARRAY git-compat-util.h: drop trailing semicolon from macro definition
Diffstat (limited to 'range-diff.c')
-rw-r--r--range-diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/range-diff.c b/range-diff.c
index a3cc7c94a3..116fb0735c 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -96,7 +96,7 @@ static int read_patches(const char *range, struct string_list *list,
string_list_append(list, buf.buf)->util = util;
strbuf_reset(&buf);
}
- util = xcalloc(sizeof(*util), 1);
+ CALLOC_ARRAY(util, 1);
if (get_oid(p, &util->oid)) {
error(_("could not parse commit '%s'"), p);
free(util);