[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181219152818.29068982@gandalf.local.home>
Date: Wed, 19 Dec 2018 15:28:18 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Tom Zanussi <zanussi@...nel.org>
Cc: tglx@...utronix.de, mhiramat@...nel.org, namhyung@...nel.org,
vedang.patel@...el.com, bigeasy@...utronix.de,
joel@...lfernandes.org, mathieu.desnoyers@...icios.com,
julia@...com, linux-kernel@...r.kernel.org,
linux-rt-users@...r.kernel.org
Subject: Re: [PATCH 2/7] tracing: Change strlen to sizeof for hist trigger
static strings
On Wed, 19 Dec 2018 14:16:31 -0600
Tom Zanussi <zanussi@...nel.org> wrote:
> > Yeah, I had considered it but wasn't sure it was worth it. Since
> > you're suggesting it is, I can send another patch on top of these, or
> > feel free if you want to too. ;-)
> >
>
> How's this?
>
> [PATCH] tracing: Introduce and use strcmp_const() for hist triggers
>
> Provide a new strcmp_const() macro and make use of it instead of the
> longer and more error-prone strncmp(str, "str", sizeof("str") - 1).
>
> Idea-and-macro-by: Steve Rostedt <rostedt@...dmis.org>
> Signed-off-by: Tom Zanussi <tom.zanussi@...ux.intel.com>
> ---
And I just sent you my version :-) (cross emails).
Note, I changed it to strncmp_const() because it should note that it's
a strncmp() and not an strcmp().
Pretty much identical patches too ;-)
-- Steve
Powered by blists - more mailing lists