Re: [RFC][PATCH 6/7] trace: constify filter_parse_regex(), match_records(), ftrace_match() and ftrace_match_record()

From: Steven Rostedt
Date: Thu Feb 05 2015 - 16:32:01 EST


On Thu, 5 Feb 2015 19:56:39 +0000
Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:

> @@ -345,12 +346,11 @@ enum regex_type filter_parse_regex(char *buff, int *len, char **search, int *not
> type = MATCH_MIDDLE_ONLY;
> else
> type = MATCH_FRONT_ONLY;
> - buff[i] = 0;
> break;
> }
> }
> }
> - *len = strlen(*search);
> + *len = buff + i - *search;

Heh, I guess I didn't need to mention this optimization. I would
recommend that this change goes into patch 5/7. No need to place it
here. It fits better with the previous patch.

-- Steve

>
> return type;
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/