[ Another email not as my daughter. ]
On Wed, Dec 19, 2018 at 02:05:32PM -0800, Joe Perches wrote:
> On Wed, 2018-12-19 at 16:32 -0500, Bryana Rostedt wrote:
> > a quick grep in the kernel tree found several
> > (thousands!) of cases that use this construct. A quick grep also
> > revealed that
[ Sending now as myself and not my daughter :-p ]
On Wed, Dec 19, 2018 at 01:54:57PM -0800, Joe Perches wrote:
> On Wed, 2018-12-19 at 16:32 -0500, Bryana Rostedt wrote:
> >
> > +/*
> > + * A common way to test a prefix of a string is to do:
> > + * strncmp(str, prefix, sizeof(prefix) - 1)
> >
Seems that I sent this as my daughter.
I'm not home now but will resend again as myself when I am.
-- Steve
On December 19, 2018 4:54:57 PM EST, Joe Perches wrote:
>On Wed, 2018-12-19 at 16:32 -0500, Bryana Rostedt wrote:
>> A discussion came up in the trace triggers thread about converting a
On Wed, 2018-12-19 at 16:32 -0500, Bryana Rostedt wrote:
> a quick grep in the kernel tree found several
> (thousands!) of cases that use this construct. A quick grep also
> revealed that there's probably several bugs in that use case. Some are
> that people forgot the "- 1" (which I found) and
On Wed, 2018-12-19 at 16:32 -0500, Bryana Rostedt wrote:
> A discussion came up in the trace triggers thread about converting a
> bunch of:
>
> strncmp(str, "const", sizeof("const") - 1)
>
> use cases into a helper macro. It started with:
>
> #define strncmp_const(str, const) \
>
A discussion came up in the trace triggers thread about converting a
bunch of:
strncmp(str, "const", sizeof("const") - 1)
use cases into a helper macro. It started with:
#define strncmp_const(str, const) \
strncmp(str, const, sizeof(const) - 1)
But then Joe Perches mentioned that if a
6 matches
Mail list logo