All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf: Fix a precedence bug
@ 2015-02-27  9:35 He Kuang
  2015-02-27 10:38 ` He Kuang
  2015-02-27 10:40 ` Masami Hiramatsu
  0 siblings, 2 replies; 7+ messages in thread
From: He Kuang @ 2015-02-27  9:35 UTC (permalink / raw)
  To: masami.hiramatsu.pt, acme, mingo; +Cc: wangnan0, linux-kernel

The minus operator has higher precedence than ?:
Add parentheses around ?: fix this.
---
 tools/perf/util/probe-event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 919937e..bed8d0f 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -150,7 +150,7 @@ static u64 kernel_get_symbol_address_by_name(const char *name, bool reloc)
 		sym = __find_kernel_function_by_name(name, &map);
 		if (sym)
 			return map->unmap_ip(map, sym->start) -
-				(reloc) ? 0 : map->reloc;
+				((reloc) ? 0 : map->reloc);
 	}
 	return 0;
 }
-- 
2.2.0.33.gc18b867


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

end of thread, other threads:[~2015-02-28  9:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27  9:35 [PATCH] perf: Fix a precedence bug He Kuang
2015-02-27 10:38 ` He Kuang
2015-02-27 10:40 ` Masami Hiramatsu
2015-02-27 10:52   ` He Kuang
2015-02-27 11:12     ` Masami Hiramatsu
2015-02-27 11:17     ` Masami Hiramatsu
2015-02-28  9:32     ` [tip:perf/core] perf probe: " tip-bot for He Kuang

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.