]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Change `if (strlen(glob))` to `if (glob[0])`
authorAmmar Faizi <ammarfaizi2@gnuweeb.org>
Sun, 17 Apr 2022 18:56:30 +0000 (01:56 +0700)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 26 Apr 2022 21:58:52 +0000 (17:58 -0400)
commit4878118afbaa249ff1f1506dbcf503472926a9bf
tree970068a1d785db46a00092af0da75886af09c0ae
parent5e71b814f75abb452eee688a9fa90f9d3c76f12f
tracing: Change `if (strlen(glob))` to `if (glob[0])`

No need to traverse to the end of string. If the first byte is not a NUL
char, it's guaranteed `if (strlen(glob))` is true.

Link: https://lkml.kernel.org/r/20220417185630.199062-3-ammarfaizi2@gnuweeb.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c