mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
tracing: Make sure the parsed string always terminates with '\0'
Always mark the parsed string with a terminated nul '\0' character. This removes the need for the users to have to append the '\0' before using the parsed string. Link: http://lkml.kernel.org/r/1516093350-12045-4-git-send-email-changbin.du@intel.com Acked-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Changbin Du <changbin.du@intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
parent
76638d9650
commit
f4d0706cde
3 changed files with 2 additions and 6 deletions
|
@ -885,8 +885,6 @@ ftrace_event_write(struct file *file, const char __user *ubuf,
|
|||
if (*parser.buffer == '!')
|
||||
set = 0;
|
||||
|
||||
parser.buffer[parser.idx] = 0;
|
||||
|
||||
ret = ftrace_set_clr_event(tr, parser.buffer + !set, set);
|
||||
if (ret)
|
||||
goto out_put;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue