X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Ffd-handle.cpp;h=8a0d95243bcdfebf4035da2981ff13cbaed454d9;hb=57b90af7b1977684094706818e387433f50b7d48;hp=7473f071789982ca1c169812ef6d109430269269;hpb=c9e313bc594f40a86eed237dce222c0fc99c957f;p=lttng-tools.git diff --git a/src/common/fd-handle.cpp b/src/common/fd-handle.cpp index 7473f0717..8a0d95243 100644 --- a/src/common/fd-handle.cpp +++ b/src/common/fd-handle.cpp @@ -19,7 +19,7 @@ struct fd_handle { static void fd_handle_release(struct urcu_ref *ref) { int ret; - struct fd_handle *handle = container_of(ref, struct fd_handle, ref); + struct fd_handle *handle = lttng::utils::container_of(ref, &fd_handle::ref); LTTNG_ASSERT(handle->fd >= 0); ret = close(handle->fd); @@ -41,7 +41,7 @@ struct fd_handle *fd_handle_create(int fd) goto end; } - handle = (fd_handle *) zmalloc(sizeof(*handle)); + handle = zmalloc(); if (!handle) { PERROR("Failed to allocate fd_handle"); goto end;