lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 26 Apr 2011 13:06:53 -0700
From:	Joe Perches <joe@...ches.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Thiago Farina <tfransosi@...il.com>,
	Alexey Dobriyan <adobriyan@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] linux/string.h: Introduce streq macro.

On Tue, 2011-04-26 at 15:58 -0400, Steven Rostedt wrote:
> On Tue, 2011-04-26 at 16:47 -0300, Thiago Farina wrote:
> > > $ grep -rP --include=*.[ch] "\bstrcmp.*==\s*0\b" * | wc -l
> > > 1143
> > > $ grep -rP --include=*.[ch] "\!\s*strcmp\s*\(" *  | wc -l
> > > 1663
> > > Can you count how many misuses of strcmp have been
> > > corrected?
> > > Do you plan to convert the existing 2800?
> > I'd work on this without any problem.
> Nothing a perl script can't do either.

That's not a real problem.

my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/;
s/\bstrcmp\s*${match_balanced_parentheses}\s*==\s*0\b/streq$1/g;
s/\!\s*strcmp\s*\(/streq\(/g;

And the other strcmp uses too?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ