Re: [PATCH] checkpatch.pl: fix naked sscanf false positives

Joe Perches
2016-02-06T23:08:50Z

On Sat, 2016-02-06 at 13:24 -0800, Kevin Wern wrote:
> On Sat, Feb 6, 2016 at 9:20 AM, Joe Perches <joe@perches.com> wrote:
> >
> > It's a single line sscanf vs multi-line sscanf issue
> >
> > $line works on
> >         ret = sscanf(buf, &foo, &bar);
> >
> > $stat works on that and
> >         ret = sscanf(buf,
> >                      &foo,
> >                      &bar);
> >
>
> Ah, ok. I dont think having just the ending paren will work though
> because the
> paren can be on the next line, so the pre-patch statement is most
> correct.
> What we should do, then, is something like:

Not really.

That'd only find an additional
sscanf
(buf,
foo,
bar);

And that's quite unlikely.

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html