From: Francis Deslauriers Date: Wed, 13 Jan 2021 17:04:49 +0000 (-0500) Subject: Fix: lttng-sessiond: Taking sizeof of a pointer X-Git-Tag: v2.13.0-rc1~358 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=37f3c202d364b9a78c37db821c508ef3a6b1f711;hp=77368158bbbbdf027c10e701bda0baf8a480361b Fix: lttng-sessiond: Taking sizeof of a pointer 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 --- 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);