diff options
author | Steven Rostedt (Google) <[email protected]> | 2024-02-22 16:14:18 -0500 |
---|---|---|
committer | Steven Rostedt (Google) <[email protected]> | 2024-03-18 10:33:04 -0400 |
commit | 916849860fa9c7d3caeb144cb5dec8831cf23bfc (patch) | |
tree | 1bbb49dddab357f4e7884d1182a19c101f3b1f44 /tools/perf/util/trace-event-scripting.c | |
parent | e8b737bfb16a0d540413173e8d1574e3bf8cc0e9 (diff) |
tracing: Use ? : shortcut in trace macros
Instead of having:
#define __assign_str(dst, src) \
memcpy(__get_str(dst), __data_offsets.dst##_ptr_ ? \
__data_offsets.dst##_ptr_ : "(null)", \
__get_dynamic_array_len(dst))
Use the ? : shortcut and compact it down to:
#define __assign_str(dst, src) \
memcpy(__get_str(dst), __data_offsets.dst##_ptr_ ? : "(null)", \
__get_dynamic_array_len(dst))
Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Chuck Lever <[email protected]>
Suggested-by: Mathieu Desnoyers <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions