Skip to content

Commit

Permalink
tracing/events: protect __get_str()
Browse files Browse the repository at this point in the history
The __get_str() macro is used in a code part then its content should be
protected with parenthesis.

[ Impact: make macro definition more robust ]

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Apr 22, 2009
1 parent 7e7ca9a commit 6a74aa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/trace/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
#define TP_printk(fmt, args...) fmt "\n", args

#undef __get_str
#define __get_str(field) (char *)__entry + __entry->__str_loc_##field
#define __get_str(field) ((char *)__entry + __entry->__str_loc_##field)

#undef TRACE_EVENT
#define TRACE_EVENT(call, proto, args, tstruct, assign, print) \
Expand Down

0 comments on commit 6a74aa4

Please sign in to comment.