All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] tools/tracing: fix application of sizeof to pointer
@ 2021-08-20  6:00 CGEL
  2021-08-20  9:00 ` Viktor.Rosendahl
  0 siblings, 1 reply; 3+ messages in thread
From: CGEL @ 2021-08-20  6:00 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Viktor Rosendahl, Colin Ian King, Xu Wang, linux-kernel,
	jing yangyang, Zeal Robot

From: jing yangyang <jing.yangyang@zte.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@zte.com.cn>
Signed-off-by: jing yangyang <jing.yangyang@zte.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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-20 14:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20  6:00 [PATCH linux-next] tools/tracing: fix application of sizeof to pointer CGEL
2021-08-20  9:00 ` Viktor.Rosendahl
2021-08-20 14:24   ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.