tracing: Use str_has_prefix() instead of using fixed sizes
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 20 Dec 2018 18:20:07 +0000 (13:20 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sun, 23 Dec 2018 03:51:54 +0000 (22:51 -0500)
commitb6b2735514bcd70ad1556a33892a636b20ece671
treea51e1477fef62ca3223c272306ab4162ae23cb05
parent754481e6954cbef53f8bc4412ad48dde611e21d3
tracing: Use str_has_prefix() instead of using fixed sizes

There are several instances of strncmp(str, "const", 123), where 123 is the
strlen of the const string to check if "const" is the prefix of str. But
this can be error prone. Use str_has_prefix() instead.

Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace.c
kernel/trace/trace_events.c
kernel/trace/trace_events_hist.c
kernel/trace/trace_probe.c
kernel/trace/trace_stack.c