Re: make checkpatch warn about memset with swapped arguments.

From: Dave Jones
Date: Thu Mar 17 2011 - 16:02:59 EST


On Thu, Mar 17, 2011 at 03:36:45PM -0400, Steven Rostedt wrote:

> > + if ($line =~ /memset.*\,(\ |)(0x|)0(\ |0|)\);/) {
>
> Wouldn't this be a better regex:
>
> if ($line =~ /memset.*\,\s*(0x)?0\s*\)\s*;/)

I dunno, regexps are all gobble-de-gook to me. Why is it better ?

Dave

--
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/