Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8bd6026e authored by Jim Cromie's avatar Jim Cromie Committed by Greg Kroah-Hartman
Browse files

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: default avatarJim Cromie <jim.cromie@gmail.com>
Signed-off-by: default avatarJason Baron <jbaron@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e703ddae
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -183,6 +183,8 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords)
		buf = skip_spaces(buf);
		buf = skip_spaces(buf);
		if (!*buf)
		if (!*buf)
			break;	/* oh, it was trailing whitespace */
			break;	/* oh, it was trailing whitespace */
		if (*buf == '#')
			break;	/* token starts comment, skip rest of line */


		/* find `end' of word, whitespace separated or quoted */
		/* find `end' of word, whitespace separated or quoted */
		if (*buf == '"' || *buf == '\'') {
		if (*buf == '"' || *buf == '\'') {