]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
tracing: Add comment to predicate_parse() about "&&" or "||"
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 14 Jan 2019 21:37:53 +0000 (16:37 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 6 Feb 2019 16:56:19 +0000 (11:56 -0500)
As the predicat_parse() code is rather complex, commenting subtleties is
important. The switch case statement should be commented to describe that it
is only looking for two '&' or '|' together, which is why the fall through
to an error is after the check.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_filter.c

index eb694756c4bb94153fccc983797372ad27c414e3..f052ecb085e96f7fe05b00953205c927601bb772 100644 (file)
@@ -491,6 +491,7 @@ predicate_parse(const char *str, int nr_parens, int nr_preds,
                                break;
                        case '&':
                        case '|':
+                               /* accepting only "&&" or "||" */
                                if (next[1] == next[0]) {
                                        ptr++;
                                        break;