* [PATCH 1/2] tools/power/x86/turbostat/turbostat.c: delete double assignment
@ 2012-08-26 8:18 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2012-08-26 8:18 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors
From: Julia Lawall <Julia.Lawall@lip6.fr>
Delete successive assignments to the same location.
Change the second assignment to the corresponding size variable, analogous
to the code below.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression i;
@@
*i = ...;
i = ...;
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
tools/power/x86/turbostat/turbostat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 861d771..fc9b2b0 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -719,7 +719,7 @@ void free_all_buffers(void)
{
CPU_FREE(cpu_present_set);
cpu_present_set = NULL;
- cpu_present_set = 0;
+ cpu_present_setsize = 0;
CPU_FREE(cpu_affinity_set);
cpu_affinity_set = NULL;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-26 8:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-26 8:18 [PATCH 1/2] tools/power/x86/turbostat/turbostat.c: delete double assignment Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).