tracing: Use str_has_prefix() helper for histogram code
commit 754481e6954cbef53f8bc4412ad48dde611e21d3 upstream.
The tracing histogram code contains a lot of instances of the construct:
strncmp(str, "const", sizeof("const") - 1)
This can be prone to bugs due to typos or bad cut and paste. Use the
str_has_prefix() helper macro instead that removes the need for having two
copies of the constant string.
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
Acked-by:
Namhyung Kim <namhyung@kernel.org>
Signed-off-by:
Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by:
George Guo <guodongtai@kylinos.cn>
Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please register or sign in to comment