[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <8fd4bb65ef3da67feac9ce3258cdbe9824752cf1.1629198502.git.jing.yangyang@zte.com.cn>
Date: Thu, 19 Aug 2021 23:00:43 -0700
From: CGEL <cgel.zte@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Viktor Rosendahl <Viktor.Rosendahl@....de>,
Colin Ian King <colin.king@...onical.com>,
Xu Wang <vulab@...as.ac.cn>, linux-kernel@...r.kernel.org,
jing yangyang <jing.yangyang@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] tools/tracing: fix application of sizeof to pointer
From: jing yangyang <jing.yangyang@....com.cn>
sizeof when applied to a pointer typed expression gives the size of
the pointer.
./tools/tracing/latency/latency-collector.c:1541:10-16:ERROR application of sizeof to pointer
This issue was detected with the help of Coccinelle.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: jing yangyang <jing.yangyang@....com.cn>
---
tools/tracing/latency/latency-collector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/tracing/latency/latency-collector.c b/tools/tracing/latency/latency-collector.c
index 3a2e6bb..64d531d 100644
--- a/tools/tracing/latency/latency-collector.c
+++ b/tools/tracing/latency/latency-collector.c
@@ -1538,7 +1538,7 @@ static void tracing_loop(void)
mutex_lock(&print_mtx);
check_signals();
write_or_die(fd_stdout, queue_full_warning,
- sizeof(queue_full_warning));
+ sizeof(*queue_full_warning));
mutex_unlock(&print_mtx);
}
modified--;
--
1.8.3.1
Powered by blists - more mailing lists