diff options
author | Jim Cromie <jim.cromie@gmail.com> | 2011-12-19 17:13:03 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 15:48:54 -0500 |
commit | 8bd6026e88cb2eb1e60ee40c7a1a0786b2db6623 (patch) | |
tree | ba8a4a4bab38500b8e6434a1a880755a2a867fc6 /lib | |
parent | e703ddae383abb24b1c7f363cb0df7e78a44ea45 (diff) |
dynamic_debug: chop off comments in ddebug_tokenize
If a token begins with #, the remainder of query string is a comment,
so drop it. Doing it here avoids '#' in quoted strings.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dynamic_debug.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 4be55d8d76b8..86a9abb9a1ce 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c | |||
@@ -183,6 +183,8 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords) | |||
183 | buf = skip_spaces(buf); | 183 | buf = skip_spaces(buf); |
184 | if (!*buf) | 184 | if (!*buf) |
185 | break; /* oh, it was trailing whitespace */ | 185 | break; /* oh, it was trailing whitespace */ |
186 | if (*buf == '#') | ||
187 | break; /* token starts comment, skip rest of line */ | ||
186 | 188 | ||
187 | /* find `end' of word, whitespace separated or quoted */ | 189 | /* find `end' of word, whitespace separated or quoted */ |
188 | if (*buf == '"' || *buf == '\'') { | 190 | if (*buf == '"' || *buf == '\'') { |