From 37f3c202d364b9a78c37db821c508ef3a6b1f711 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Wed, 13 Jan 2021 12:04:49 -0500 Subject: [PATCH] Fix: lttng-sessiond: Taking sizeof of a pointer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by clang-tidy: bugprone-sizeof-expression: Suspicious usage of `sizeof(A*)` Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau Change-Id: Ie3069ad3d81d460646c71923f0f396cf18980540 --- src/bin/lttng-sessiond/client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bin/lttng-sessiond/client.c b/src/bin/lttng-sessiond/client.c index 6c17ea2c1..e1552c345 100644 --- a/src/bin/lttng-sessiond/client.c +++ b/src/bin/lttng-sessiond/client.c @@ -2629,8 +2629,7 @@ static void *thread_manage_clients(void *data) struct lttcomm_lttng_msg *llm = (typeof( llm)) cmd_ctx.reply_payload.buffer.data; - assert(cmd_ctx.reply_payload.buffer.size >= - sizeof(llm)); + assert(cmd_ctx.reply_payload.buffer.size >= sizeof(*llm)); assert(cmd_ctx.lttng_msg_size == cmd_ctx.reply_payload.buffer.size); llm->fd_count = lttng_payload_view_get_fd_handle_count(&view); -- 2.34.1