diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-03-19 15:25:38 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-03-19 15:25:38 -0700 |
| commit | 92ccd7b7529a852583c5033ba28b4414cd2f7654 (patch) | |
| tree | bce1548bcd2cd806a4524b812fb56f19b397b7d2 /patch-ids.c | |
| parent | Merge branch 'rs/avoid-null-statement-after-macro-call' (diff) | |
| parent | cocci: allow xcalloc(1, size) (diff) | |
| download | git-92ccd7b7529a852583c5033ba28b4414cd2f7654.tar.gz git-92ccd7b7529a852583c5033ba28b4414cd2f7654.zip | |
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 'patch-ids.c')
| -rw-r--r-- | patch-ids.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/patch-ids.c b/patch-ids.c index 3f404e4b0b..8bf425555d 100644 --- a/patch-ids.c +++ b/patch-ids.c @@ -124,7 +124,7 @@ struct patch_id *add_commit_patch_id(struct commit *commit, if (!patch_id_defined(commit)) return NULL; - key = xcalloc(1, sizeof(*key)); + CALLOC_ARRAY(key, 1); if (init_patch_id_entry(key, commit, ids)) { free(key); return NULL; |
