summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dir.c b/dir.c
index fd8aa7c40f..19c2fa239b 100644
--- a/dir.c
+++ b/dir.c
@@ -1488,7 +1488,7 @@ static void prep_exclude(struct dir_struct *dir,
const char *cp;
struct oid_stat oid_stat;
- stk = xcalloc(1, sizeof(*stk));
+ CALLOC_ARRAY(stk, 1);
if (current < 0) {
cp = base;
current = 0;
@@ -3162,7 +3162,7 @@ void write_untracked_extension(struct strbuf *out, struct untracked_cache *untra
int varint_len;
const unsigned hashsz = the_hash_algo->rawsz;
- ouc = xcalloc(1, sizeof(*ouc));
+ CALLOC_ARRAY(ouc, 1);
stat_data_to_disk(&ouc->info_exclude_stat, &untracked->ss_info_exclude.stat);
stat_data_to_disk(&ouc->excludes_file_stat, &untracked->ss_excludes_file.stat);
ouc->dir_flags = htonl(untracked->dir_flags);
@@ -3373,7 +3373,7 @@ struct untracked_cache *read_untracked_extension(const void *data, unsigned long
if (next + exclude_per_dir_offset + 1 > end)
return NULL;
- uc = xcalloc(1, sizeof(*uc));
+ CALLOC_ARRAY(uc, 1);
strbuf_init(&uc->ident, ident_len);
strbuf_add(&uc->ident, ident, ident_len);
load_oid_stat(&uc->ss_info_exclude,