X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fkernel-ctl%2Fkernel-ctl.cpp;fp=src%2Fcommon%2Fkernel-ctl%2Fkernel-ctl.cpp;h=76960307c80abe7924011c22f2f3a3ebccfc626d;hp=059ab4b0dc5a41060818c624abb1e5d16528520e;hb=64803277bbdbe0a943360d918298a48157d9da55;hpb=60f1b42d6280b6bd386abb726dca4fd3b31d8491 diff --git a/src/common/kernel-ctl/kernel-ctl.cpp b/src/common/kernel-ctl/kernel-ctl.cpp index 059ab4b0d..76960307c 100644 --- a/src/common/kernel-ctl/kernel-ctl.cpp +++ b/src/common/kernel-ctl/kernel-ctl.cpp @@ -181,7 +181,7 @@ int kernctl_syscall_mask(int fd, char **syscall_mask, uint32_t *nr_bits) array_alloc_len = lttng_align_ceil(kmask_len.len, 8) >> 3; - kmask = (lttng_kernel_abi_syscall_mask *) zmalloc(sizeof(*kmask) + array_alloc_len); + kmask = zmalloc(sizeof(*kmask) + array_alloc_len); if (!kmask) { ret = -1; goto end; @@ -519,7 +519,7 @@ int kernctl_capture(int fd, const struct lttng_bytecode *capture) struct lttng_kernel_abi_capture_bytecode *kb; /* Translate bytecode to kernel bytecode. */ - kb = (lttng_kernel_abi_capture_bytecode *) zmalloc(sizeof(*kb) + capture->len); + kb = zmalloc(sizeof(*kb) + capture->len); if (!kb) { ret = -ENOMEM; goto end; @@ -542,7 +542,7 @@ int kernctl_filter(int fd, const struct lttng_bytecode *filter) int ret; /* Translate bytecode to kernel bytecode */ - kb = (lttng_kernel_abi_filter_bytecode *) zmalloc(sizeof(*kb) + filter->len); + kb = zmalloc(sizeof(*kb) + filter->len); if (!kb) return -ENOMEM; kb->len = len = filter->len;