]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit669951268b1b2b8d978f29996e7a1dc55adbd06d
treea51e1477fef62ca3223c272306ab4162ae23cb05
parent952d1b5a7f4f39c041390f839e42932d503daab5
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