summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aux_children.c2
-rw-r--r--bpf.c2
-rw-r--r--kvm.c2
-rw-r--r--perf.c2
-rw-r--r--syscall.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/aux_children.c b/aux_children.c
index f3b25c344..1f7267b12 100644
--- a/aux_children.c
+++ b/aux_children.c
@@ -65,7 +65,7 @@ register_aux_child_ex(pid_t pid, const struct aux_child_handlers *h,
error_func_msg_and_die("Duplicate auxiliary child pid");
}
- child = xcalloc(1, sizeof(*child));
+ child = xzalloc(sizeof(*child));
child->pid = pid;
child->handlers = h ?: &default_handlers;
diff --git a/bpf.c b/bpf.c
index 1eeb0e440..420b44026 100644
--- a/bpf.c
+++ b/bpf.c
@@ -780,7 +780,7 @@ BEGIN_BPF_CMD_DECODER(BPF_OBJ_GET_INFO_BY_FD)
struct obj_get_info_saved *saved;
if (entering(tcp)) {
- saved = xcalloc(1, sizeof(*saved));
+ saved = xzalloc(sizeof(*saved));
saved->info_len = attr.info_len;
set_tcb_priv_data(tcp, saved, free);
diff --git a/kvm.c b/kvm.c
index 5271322f9..984a75e86 100644
--- a/kvm.c
+++ b/kvm.c
@@ -44,7 +44,7 @@ vcpu_find(struct tcb *const tcp, int fd)
static struct vcpu_info *
vcpu_alloc(struct tcb *const tcp, int fd, int cpuid)
{
- struct vcpu_info *vcpu_info = xcalloc(1, sizeof(*vcpu_info));
+ struct vcpu_info *vcpu_info = xzalloc(sizeof(*vcpu_info));
vcpu_info->fd = fd;
vcpu_info->cpuid = cpuid;
diff --git a/perf.c b/perf.c
index d3a981660..f989dfcc8 100644
--- a/perf.c
+++ b/perf.c
@@ -74,7 +74,7 @@ fetch_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
/* Size should be multiple of 8, but kernel doesn't check for it */
/* size &= ~7; */
- attr = xcalloc(1, sizeof(*attr));
+ attr = xzalloc(sizeof(*attr));
if (umoven_or_printaddr(tcp, addr, size, attr)) {
free(attr);
diff --git a/syscall.c b/syscall.c
index 156243c91..308fc40a8 100644
--- a/syscall.c
+++ b/syscall.c
@@ -1305,7 +1305,7 @@ get_scno(struct tcb *tcp)
tcp->s_ent = &sysent[tcp->scno];
tcp->qual_flg = qual_flags(tcp->scno);
} else {
- struct sysent_buf *s = xcalloc(1, sizeof(*s));
+ struct sysent_buf *s = xzalloc(sizeof(*s));
s->tcp = tcp;
s->ent = stub_sysent;